ATOM RegisterClass(lpwc) | |||||
LPWNDCLASS lpwc; | /* address of structure with class data | */ |
The RegisterClass function registers a window class for subsequent use in calls to the CreateWindow or CreateWindowEx function.
lpwc
Points to a WNDCLASS structure. The structure must be filled with the appropriate class attributes before being passed to the function. The WNDCLASS structure has the following form:
typedef struct tagWNDCLASS { /* wc */
UINT style;
WNDPROC lpfnWndProc;
int cbClsExtra;
int cbWndExtra;
HANDLE hInstance;
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
LPCTSTR lpszMenuName;
LPCTSTR lpszClassName;
} WNDCLASS;
The return value is an atom that uniquely identifies the class being registered.
All window classes registered by an application are unregistered when the application terminates.
CreateWindow, CreateWindowEx, GetClassInfo, GetClassName, UnregisterClass, WindowProc