ATOM RegisterClassEx(
CONST WNDCLASSEX *lpwcx // address of structure with class data
);
其中WNDCLASSEX声明如下:
typedef struct _WNDCLASSEX {
UINT cbSize;
UINT style;
WNDPROC lpfnWndProc;
int cbClsExtra;
int cbWndExtra;
HANDLE hInstance;
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
LPCTSTR lpszMenuName;
LPCTSTR lpszClassName;
HICON hIconSm;
} WNDCLASSEX;
///////////////////////////////
ATOM RegisterClass(
CONST WNDCLASS *lpWndClass // address of structure with class
// data
);
其中WNDCLASS声明如下:
typedef struct _WNDCLASS {
UINT style;
WNDPROC lpfnWndProc;
int cbClsExtra;
int cbWndExtra;
HANDLE hInstance;
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
LPCTSTR lpszMenuName;
LPCTSTR lpszClassName;
} WNDCLASS;
WNDCLASSEX 比 WNDCLASS 结构多一个参数,用来定义窗口的特别样式。
本文详细介绍了Windows编程中用于注册窗口类的两种方法:RegisterClassEx和RegisterClass。这两种方法分别使用WNDCLASSEX和WNDCLASS结构体来指定窗口类属性,并且WNDCLASSEX结构相比WNDCLASS多了额外的一个字段来定义窗口的特别样式。

867

被折叠的 条评论
为什么被折叠?



