#include <windows.h> #include <stdio.h> int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { LPSTR szString = "Windows data type string"; CHAR lpString[120]; DWORD dwMax = 0xFFFFFFFF; DWORD dwOne = 0x1; INT iMax = 0xFFFFFFFF; INT iOne = 0x1; MessageBox(NULL,szString,"LPSTR",MB_OK); CopyMemory(lpString,szString,lstrlen(szString)+1); MessageBox(NULL,lpString,"CHAR[]",MB_OK); if(dwMax>dwOne) { MessageBox(NULL,"DWORD数据类型0xFFFFFFFF大于0x1","DWORD",MB_OK); } if(iMax<iOne) { MessageBox(NULL,"INT数据类型0xFFFFFFFF小于0x1","INT",MB_OK); } }
DWORD是32位无符号整形数据
LPSTR是ANSI字符串变量
HANDLE 对象句柄
HINSTANCE程序实例句柄
HWND窗口句柄
HMODULE模块句柄
HKEY注册表句柄
INT_PTR指向INT型的指针
LPARAM消息的L参数
WPARAM消息的W参数
LPDWORD指向DWORD类型的指针
SIZE_T表示内存大小以字节为单位
时间: 2024-10-25 11:33:28