本文共 1527 字,大约阅读时间需要 5 分钟。
转载来源:
前缀 | 变量定义 | 变量 |
b 或f | 布尔型(非0 为true ,0 为false ) | bool ,f 代表旗标 |
c | 字符变量(char )一个字节 | char ,WCHAR,TCHAR |
dw | 32 为无符号长整型整数,无正负号长整数 | DWORD |
f | 用16 位整数表示的一种位标记 | 旗标 |
h | 16 位句柄 | 句柄 |
l | 32 位长整型 | LONG |
lp | 32 位长指针 | long * |
n | 16 位短整型 | short |
p | 16 位短指针 | 指针 |
pt | 坐标量(x ,y ),放在32 位无符号整数中 | |
rgb | RGB 颜色值,放在32 位整数中 | |
by | 无正负号字符 | BYTE |
i | 整型 | int |
fn | 函数 | function |
s | 字符串 | string |
sz | 以字节0 结尾的字符串 | String Zero |
数据类型 | 对应的基本数据类型 | 说明 |
BOOL | int | 布尔值 |
BSTR | Unsigned short* | 32 位字符指针 |
BYTE | Unsigned char | 8 位无符号字节变量 |
COLORREF | Unsigned long | 用作颜色的32 位值 |
DWORD | Unsigned long | 32 位无符号整数,段地址和相关的偏移地址 |
LONG | long | 32 位带符合整数 |
LPARAM | long | 作为参数传递给窗口过程或回调函数的32 位值 |
LPCSTR | Const char* | 指向字符串常量的32 位指针 |
LPSTR | Char* | 指向字符串的32 位指针 |
LPCTSTR | Const char* (注1 ) | 指向可移植为Unicode 和DBCS 字符串常量的32 位指针 |
LPTSTR | Char* (注1 ) | 指向可移植为Unicode 和DBCS 字符串的32 位指针 |
LPVOID | Void* | 指向未定义类型的32 位指针 |
LRESULT | long | 来自窗口过程或回调函数的32 位返回值 |
UINT | Unsigned int | 32 位无符号整数 |
WNDPROC | Long (__stdcall* )(void*,unsigned int,long) 注2 | 指向窗口过程的32 位指针 |
WORD | Unsigned short | 16 位无符号浮点型 |
WPARAM | Unsigned int | 当作参数传递给窗口过程或回调函数的32 位整数 |
句柄类型 | 说明 |
HBITMAP | 保存位图信息的内存区域的句柄 |
HBRUSH | 画刷句柄 |
HCTR | 字窗口控件句柄 |
HCURSOR | 鼠标光标句柄 |
HDC | 设备描述表句柄 |
HDLG | 对话框句柄 |
HFONT | 字体句柄 |
HICON | 图标句柄 |
HINSTANCE | 应用程序的实例句柄 |
HMENU | 菜单句柄 |
HMODULE | 模块句柄 |
HPALETTE | 颜色调色板句柄 |
HPEN | 在设备上画图时用于指明线性的笔的句柄 |
HRGN | 剪贴区域句柄 |
HTASK | 独立于已执行任务的句柄 |
HWND | 窗口句柄 |
结构 | 含义 |
MSG | 消息结构 |
WNDCLASS | 窗口类别结构 |
PAINTSTRUCT | 绘图结构 |
RECT | 矩形结构 |