GetWindowWord

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

This function retrieves information about the window identified by hwnd.

Parameters

hwnd

Identifies the window.

nIndex

Specifies the byte offset of the value to be retrieved.

Return Value

The return value specifies information about the given 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. The return value will contain the retrieved two-byte value in its low-order word, with zero in its high-order word.

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

Old GetWindowWord Index New GetWindowLong Index

GWW_HINSTANCE GWL_HINSTANCE
GWW_HWNDPARENT GWL_HWNDPARENT
GWW_ID GWL_ID

See Also

SetWindowWord, GetWindowLong, SetWindowLong, SetParent, GetParent