windows_programming_notes.nbk: Home | Index | Next Page: ReleaseCapture | Previous Page: RegisterClass
RegisterClassEx
ATOM RegisterClassEx(
CONST WNDCLASSEX *lpwcx // class data
);
Parameters
lpwcx
Pointer to a WNDCLASSEX structure. You must fill the structure with the appropriate class attributes before passing it to the function.
Return Values
If the function succeeds, the return value is a class atom that uniquely identifies the class being registered. This atom can only be used by the CreateWindow, CreateWindowEx, GetClassInfo, GetClassInfoEx, FindWindow, FindWindowEx, and UnregisterClass functions and the IActiveIMMApp::FilterClientWindows Method.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
If you register the window class by using RegisterClassExA, the application tells the system that the windows of the created class expect messages with text or character parameters to use the ANSI character set; if you register it by using RegisterClassExW, the application requests that the system pass text parameters of messages as Unicode. The IsWindowUnicode function enables applications to query the nature of each window. For more information on ANSI and Unicode functions in the Win32 API, see Function Prototypes.
All window classes that an application registers are unregistered when it terminates.
Windows 95: All window classes registered by a .dll are unregistered when the .dll is unloaded.
Windows NT/2000 or later: No window classes registered by a .dll are unregistered when the .dll is unloaded. A .dll must explicitly unregister its classes when it is unloaded.
Windows 95: RegisterClassEx fails if the cbWndExtra or cbClsExtra member of the WNDCLASSEX structure contains more than 40 bytes.
windows_programming_notes.nbk: Home | Index | Next Page: ReleaseCapture | Previous Page: RegisterClass
Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time