DWORD GetClassLong(hwnd, nIndex) | |||||
HWND hwnd; | /* handle of window | */ | |||
int nIndex; | /* offset of value to retrieve | */ |
This function retrieves the long value specified by the nIndex parameter from the WNDCLASS structure of the window specified by the hwnd parameter.
hwnd
Identifies the window.
nIndex
Specifies the byte offset of the value to be retrieved. It can also be the following value:
Value | Meaning |
GCL_CBCLSEXTRA | Tells how many bytes of additional class information you have. For information on how to access this memory, see the following “Comments” section. |
GCL_CBWNDEXTRA | Tells how many bytes of additional window information you have. For information on how to access this memory, see the following “Comments” section. |
GCL_HBRBACKGROUND | Retrieves a handle to the background brush. |
GCL_HCURSOR | Retrieves a handle to the cursor. |
GCL_HICON | Retrieves a handle to the icon. |
GCL_HMODULE | Retrieves a handle to the module. |
GCL_MENUNAME | Retrieves a pointer to the menu-name string. |
GCL_STYLE | Retrieves the window-class style bits. |
GCL_WNDPROC | Retrieves a pointer to the window function. |
The return value specifies the value retrieved from the WNDCLASS structure.
To access any extra four-byte values allocated when the window-class structure was created, use a positive byte offset as the index specified by the nIndex parameter. The first four-byte value in the extra space is at offset zero, the next four-byte value is at offset 4, and so on.
SetClassLong, GetClassWord, SetClassWord