Application Global Classes

An application global class is a window class registered by an executable or dynamic-link library (DLL) that is available to all other modules in the process. For example, your DLL can call the RegisterClassEx function to register a window class that defines a custom control as an application global class so that a process that loads the DLL can create instances of the custom control.

Windows NT: To create a class that can be used in every process, create the window class in a DLL and load the DLL in every process. To load the DLL in every process, add its name to the AppInit_DLLs value in following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows

Whenever a process starts, the system loads the specified DLL in the context of the newly started process before calling its entry-point function. The DLL must register the class during its initialization procedure and must specify the CS_GLOBALCLASS style. For more information, see Class Styles.

To remove an application global class and free the storage associated with it, use the UnregisterClass function.