二维码源码vc
❶ vc如何调用二维码库生成qr类型的二维码,关于它的库有没有吗
[cpp] view plain
#include "bssQRCodeGenerator.h:
#pragma comment(lib,"bssQRCodeGenerator.lib")
unsigned char *m_pImgData = 0;
int m_nImgWidth = 0;
int m_nImgHeight = 0;
int m_nImgRowDist = 0;
int m_nImgModSize = 2;//二维码图像大小相当于是(29*size)*(29*size)
CString timeContent = "blog.csdn.com/weichaohnu";
const char *Content = (LPCTSTR)timeContent;
int m_nRes = BSS_GenerateQRCode( Content,
timeContent.GetLength(),
m_nImgModSize,
4,
(void**)&m_pImgData,//m_pImgData就是每个像素点的8位数据
m_nImgWidth,//m_nImgWidth是图像宽度,这里的结果是29的倍数,导致都不是4的倍数
m_nImgHeight,//图像高度
m_nImgRowDist );//所以m_nImgRowDist会比m_nImgWidth大点,但是是4的倍数,这是为了位图存储(windows下位图每行的字节数必须是4的倍数)