正文

MFC常用数据类型2007-05-20 16:55:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/12567/26016.html

分享到:

MFC常用数据类型: 1、UINT   A 16-bit unsigned integer on Windows versions 3.0 and 3.1; a 32-bit unsigned integer on Win32.定义原型:typedef unsigned int        UINT; 2、bool应该是C语言里定义的,返回值为true和false(事实上就上1和0)       BOOL应该是MFC及SDK里定义返回值的.   它的定义应该是:typedef   int   BOOL;(WINDEF.H中定义)   也就是说它是int型的   返回值是大写的TRUE   和FALSE   定义如下:   #define   FALSE       0   #define   TRUE        1   (AFX.H中如此定义)   3、BSTR   A 32-bit character pointer 32位的字符指针。定义原型:#if defined(WIN32) && !defined(OLE2ANSI)typedef WCHAR OLECHAR;#elsetypedef char OLECHAR;#endiftypedef OLECHAR* BSTR; 4、BYTE   An 8-bit integer that is not signed.无符号8位整数。注意整数和整型int不一样。定义原型:typedef unsigned char       BYTE; 5、COLORREF   A 32-bit value used as a color value.定义原型:typedef DWORD   COLORREF; 6、DWORD   A 32-bit unsigned integer or the address of a segment and its associated offset.定义原型:typedef unsigned long       DWORD; 7、LONG   A 32-bit signed integer.定义原型:typedef long LONG; 8、LPARAM   A 32-bit value passed as a parameter to a window procedure or callback function.定义原型:typedef LONG LPARAM; 9、LPCSTR   A 32-bit pointer to a constant character string定义原型:typedef CONST CHAR *LPCSTR, *PCSTR; 10、LPSTR   A 32-bit pointer to a character string.定义原型:typedef CHAR *LPSTR, *PSTR; 11、LPCTSTR   A 32-bit pointer to a constant character string that is portable for Unicode and DBCS.定义原型:typedef LPCSTR LPCTSTR; 12、LPTSTR   A 32-bit pointer to a character string that is portable for Unicode and DBCS.定义原型:typedef LPSTR PTSTR, LPTSTR; 13、LPVOID   A 32-bit pointer to an unspecified type.定义原型:typedef void far            *LPVOID; 14、LRESULT   A 32-bit value returned from a window procedure or callback function.定义原型:typedef LONG LRESULT; 15、WNDPROC   A 32-bit pointer to a window procedure.定义原型:typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM); 16、WORD   A 16-bit unsigned integer.定义原型:typedef unsigned short      WORD; 17、WPARAM   A value passed as a parameter to a window procedure or callback function: 16 bits on Windows versions 3.0 and 3.1; 32 bits on Win32. 定义原型:typedef UINT WPARAM; 18、POSITION   A value used to denote the position of an element in a collection; used by MFC collection classes.定义原型:// abstract iteration positionstruct __POSITION { };typedef __POSITION* POSITION; 19、LPCRECT   A 32-bit pointer to a constant (nonmodifiable) RECT structure. 定义原型:typedef const RECT* LPCRECT;    // pointer to read/only RECT

阅读(3502) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册