GetClassWord

  WORD GetClassWord(hwnd, nIndex)    
  HWND hwnd; /* handle of window */
  int nIndex; /* offset of value to retrieve */

This function retrieves the value specified by the nIndex parameter from the Windows additional class memory defined during class registration for the window specified by the hwnd parameter.

Parameters

hwnd

Identifies the window.

nIndex

Specifies the byte offset of the value to be retrieved.

Return Value

The return value specifies the value retrieved from the Windows additional class memory defined during class registration for the specified window.

Comments

To access any extra two-byte values allocated when the window-class structure was created, use a positive byte offset as the index specified by the nIndex parameter, starting at zero for the first two-byte value in the extra space, two for the next two-byte value and so on.

Use the GetClassLong function to retrieve the following system-defined values:

Old GetClassWord Index New GetClassLong Index

GCW_CBCLSEXTRA GCL_CBCLSEXTRA
GCW_CBWNDEXTRA GCL_CBWNDEXTRA
GCW_HBRBACKGROUND GCL_HBRBACKGROUND
GCW_HCURSOR GCL_HCURSOR
GCW_HICON GCL_HICON
GCW_HMODULE GCL_HMODULE
GCW_MENUNAME GCL_MENUNAME
GCW_STYLE GCL_STYLE

See Also

GetClassLong, RegisterClass, SetClassLong, SetClassWord