The GetClassWord function retrieves the 16-bit (word) value at the specified offset into the extra class memory for the window class to which the specified window belongs.
Other than GCW_ATOM and GCW_HICONSM, the GCW_ values support by 16-bit Windows are obsolete. You must use the GetClassLong function to retrieve the class values of a window.
WORD GetClassWord(
HWND hWnd, // handle of window
int nIndex // offset of value to retrieve
);
Value | Action |
---|---|
GCW_ATOM | Retrieves an ATOM value that uniquely identifies the window class. This is the same atom that the RegisterClass function returns. |
GCW_HICONSM | Retrieves the handle of the small icon associated with the window. |
If the function succeeds, the return value is the requested 16-bit value.
If the function fails, the return value is otherwise, it is zero. To get extended error information, call GetLastError.
Reserve extra class memory by specifying a nonzero value in the cbClsExtra member of the WNDCLASS structure used with the RegisterClass function.
Window Classes Overview, Window Class Functions, GetClassLong, RegisterClass, SetClassWord, WNDCLASS