The elements of a window class define the default behavior of windows
belonging to the class. The application that registers a window class assigns elements
to the class by setting appropriate members in a WNDCLASSEX structure and passing the structure to the RegisterClassEx function. The GetClassInfoEx and GetClassLong functions retrieve information about a given window class. The SetClassLong function changes elements of a local or global class that the application has
already registered.
Element
| Purpose
|
Class name
| Distinguishes the class from other registered classes.
|
Window-procedure address
| Points to the function that processes all messages sent to windows in the
class and defines the behavior of the window.
|
Instance handle
| Identifies the application or DLL that registered the class.
|
Class cursor
| Defines the mouse cursor that Windows displays for a window of the class.
|
Class icon
| Defines the large icon.
|
Small class icon
| Defines the small icon (Windows version 4.0 and higher).
|
Class background brush
| Defines the color and pattern that fill the client area when the window is
opened or painted.
|
Class menu
| Specifies the default menu for windows that do not explicitly define a menu.
|
Class styles
| Defines how to update the window after moving or resizing it, how to process
double-clicks of the mouse, how to allocate space for the device context, and
other aspects of the window.
|
Extra class memory
| Specifies the amount of extra memory, in bytes, that Windows should reserve
for the class. All windows in the class share the extra memory and can use it for
any application-defined purpose. Windows initializes this memory to zero.
|
Extra window memory
| Specifies the amount of extra memory, in bytes, that Windows should reserve
for each window belonging to the class. The extra memory can be used for any
application-defined purpose. Windows initializes this memory to zero.
|