GetFocus

  HWND GetFocus(VOID)    

The GetFocus function retrieves the handle of the keyboard-focus window associated with the calling thread.

Parameters

This function has no parameters.

Return Value

The return value is the handle of the keyboard-focus window associated with the calling thread. The return value is NULL if the calling thread does not contain a keyboard-focus window.

Comments

A return value of NULL does not mean that no keyboard-focus window exists. Another thread may contain a keyboard focus window.

See Also

GetActiveWindow, GetCapture, SetFocus, WM_KILLFOCUS, WM_SETFOCUS