C++
ADA_Ivan
好好学习,坚持学习,用力学习
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
USB设备VID-PID读取
#include <setupapi.h> #pragma comment(lib, "setupapi.lib") CHAR g_cVID[5] = {0}; CHAR g_cPID_RGB[5] = {0}; CHAR g_cPID_Infrared[5] = {0}; BOOL GetCameraUSB() { BOOL bRet = FALSE; BOOL...原创 2019-04-16 14:52:28 · 3454 阅读 · 0 评论 -
USB设备插拔消息响应,获取VIDPID
//USB Connect #include "Dbt.h" #include "usbiodef.h" #include <winioctl.h> #include <setupapi.h> #include <initguid.h> DEFINE_GUID(GUID_DEVINTERFACE_USB_DEVICE, 0xA...原创 2019-04-16 14:54:20 · 1482 阅读 · 0 评论 -
C++图片数据流显示在窗口上
#include "atlimage.h" #include "gdiplus.h" #pragma comment( lib, "gdiplus.lib" ) typedef struct _Cam_Display { WORD wWidth; WORD wHeight; WORD wX; WORD wY;...原创 2019-04-16 14:58:07 · 2053 阅读 · 0 评论 -
char和wchar相互转换
wchar_t * char2wchar(const char* cchar) { wchar_t *m_wchar; int len = MultiByteToWideChar( CP_ACP ,0,cchar ,strlen( cchar), NULL,0); m_wchar= new wchar_t[len+1]; M...转载 2019-04-16 15:02:34 · 5080 阅读 · 0 评论 -
Base64格式文件转换实例
//++Base64.h #pragma once #include "string" class CBase64 { public: CBase64(void); ~CBase64(void); /*编码 DataByte [in]输入的数据长度,以字节为单位 */ std::string Encode(const char...转载 2019-04-16 15:04:33 · 767 阅读 · 0 评论 -
OnTimer&SetTimer使用方法(MFC)
MFC中使用Timer事件处理机制, 1、在头文件中声明,afx_msg void OnTimer(UINT nIDEvent); 2、在消息映射里追加,ON_WM_TIMER()(忘记追加消息将不会响应) 3、在使用时开始Timer,例如:SetTimer(44, 1000, NULL);原型为SetTimer(UINT_PTR nIDEvent, UINT nElapse, ...原创 2019-08-01 16:49:16 · 2198 阅读 · 0 评论
分享