UnregisterClass

Version 3.0

Syntax

BOOL UnregisterClass(lpClassName,hInstance)

This function removes the window class specified by lpClassName from the window-class table, freeing the storage required for the class.

Parameter Type/Description  

lpClassName LPSTR Points to a null-terminated string containing the class name. This class name must have been previously registered by calling the RegisterClass function with a valid hInstance field in the WNDCLASS structure parameter. Predefined classes, such as dialog-box controls, may not be unregistered.  
hInstance HANDLE Identifies the instance of the module that created the class.  

Return Value

The return value is TRUE if the function successfully removed the window class from the window-class table. It is FALSE if the class could not be found or if a window exists that was created with the class.

Comments

Before using this function, destroy all windows created with the specified class.