BOOL AFXAPI AfxRegisterClass( WNDCLASS* lpWndClass );
Return Value
TRUE if the class is successfully registered; otherwise FALSE.
Parameters
lpWndClass
Pointer to a WNDCLASS structure containing information about the window class to be registered. For more information on this structure, see the Win32 SDK documentation.
Remarks
Use this function to register window classes in a DLL that uses MFC. If you use this function, the class is automatically unregistered when the DLL is unloaded.
In non-DLL builds, the AfxRegisterClass identifier is defined as a macro that maps to the Windows function RegisterClass, since classes registered in an application are automatically unregistered. If you use AfxRegisterClass instead of RegisterClass, your code can be used without change both in an application and in a DLL.