资源简介
大华SDK开发Demo集合,包含了:库文件,头文件,演示demo,实例程序,使用手册,CQT版Demo 详见:https://blog.csdn.net/u012534831
代码片段和文件信息
// ChangePassword.cpp : implementation file
//
#include “stdafx.h“
#include “searchdevice.h“
#include “ChangePassword.h“
#include “LibQREncode/qrencode.h“
#include
#pragma warning(disable:4291)
#ifndef NEW
#define NEW new(std::nothrow)
#endif
#define QR_PICTURE_PATH “./QRpicture/QRCode.bmp“
/////////////////////////////////////////////////////////////////////////////
// CChangePassword dialog
CResetPassword::CResetPassword(CWnd* pParent /*=NULL*/)
: CDialog(CResetPassword::IDD pParent)
m_bOverseas(false)
{
//{{AFX_DATA_INIT(CChangePassword)
m_strSecuityCode = _T(““);
m_strNewPwd = _T(““);
m_strConfirmPwd = _T(““);
//}}AFX_DATA_INIT
memset(m_cQrCode 0 MAX_QRCODE_LEN);
m_showPicture = NULL;
m_showPicture = NEW CShowPicture();
if(m_showPicture == NULL)
return;
strncpy(m_fileName QR_PICTURE_PATH sizeof(m_fileName) - 1);
memset(m_szMac 0 sizeof(m_szMac));
memset(m_szUserName 0 sizeof(m_szUserName));
m_byInitStaus = 0;
m_bOverseas = false;
}
void CResetPassword::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CChangePassword)
DDX_Text(pDX IDC_EDIT_SECUTITYCODE m_strSecuityCode);
DDX_Text(pDX IDC_EDIT_NEWPWD m_strNewPwd);
DDX_Text(pDX IDC_EDIT_CONFIRMPWD m_strConfirmPwd);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CResetPassword CDialog)
//{{AFX_MSG_MAP(CChangePassword)
ON_WM_PAINT()
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDOK &CResetPassword::OnBnClickedOk)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChangePassword message handlers
void CResetPassword::OnOK()
{
// TODO: Add extra validation here
UpdateData(TRUE);
if (m_strSecuityCode.IsEmpty())
{
MessageBox(ConvertString(“Please input security code“) ConvertString(“Prompt“));
return;
}
if (m_strNewPwd.IsEmpty())
{
MessageBox(ConvertString(“Please input password“) ConvertString(“Prompt“));
return ;
}
if (m_strConfirmPwd.IsEmpty())
{
MessageBox(ConvertString(“Please confirm password“) ConvertString(“Prompt“));
return ;
}
if(m_strNewPwd.Compare(m_strConfirmPwd))
{
MessageBox(ConvertString(“Confirm password is invalidplease input again“)ConvertString(“Prompt“));
return ;
}
CDialog::OnOK();
}
//Create bmp picture
bool CResetPassword::MyQRGenerator(char *szSourceSring)
{
if (NULL == szSourceSring)
{
return false;
}
unsigned int unWidth;
unsigned int unWidthAdjusted;
unsigned int unDataBytes;
unsigned char* pRGBData;
unsigned char* pSourceData;
unsigned char* pDestData;
QRcode* pQRC = NULL;
FILE* outFile = NULL;
pQRC = QRcode_encodeString(szSourceSring 0 QR_ECLEVEL_H QR_MODE_8 1);
if(0 == pQRC)
{
return false;
}
unWidth = pQRC->width;
unWidthAdjusted = unWidth * OUT_FILE_PIXEL_PRESCALER * 3;
if (unWidthAdjusted % 4)
{
unWidt
相关资源
- 美松打印机SDK MsPrintSDK-Demo-DLL-CShare-
- S32K144 和S32K SDK开发入门培训.pdf
- 虚拟摄像头VCam开发SDK
- 整理的ModbusProtocol SDK开发包
- 大华摄像头抓图录像亲测可用
- WinCE_6.0_中文SDK(仿真器模拟器)
- silverlight4 SDK
- N76E003开发资料最新SDK参考代码
- rockchip rv1108和rk3288资料,淘宝28买的
- 海康摄像头+web3.0开发包SDK的demo
- 海康SDK delphi demo
- 海康sdk说明书 二次开发参考
- 企业微信JS-SDK调试工具
- 人脸识别开源SDK源码
- NVIDIAOpticalFlowSDK-79c6cee80a2df9a196f20afd6
- delphi百度人脸识别离线SDK demo
- 汉王人脸通sdk v3.0 delphi demo
- 汉王考勤机开发指南HANVON SDK 20141119
- 撸大师死灰复燃SDK,可常驻后台运行
- 精伦电子开发包最新开发包带网页插
- IDCardReader SDK.rar
- 精伦电子idr210 sdk
- 大华笔试题+答案
- 光阵通用高拍仪控件
- oaid_sdk_1.0.23.zip200578
- 操作系统 宗大华 课后答案
- Nokia SDK 开发模拟器
- x86-sdk25-v89-x86-64 xp框架
- 基于FFMPEG SDK流媒体开发1---解码媒体文
- Mifare卡LockSDK V3.3酒管软件接口_160301
评论
共有 条评论