GetActiveWindow

The GetActiveWindow function retrieves the window handle to the active window associated with the calling thread's message queue.

HWND GetActiveWindow(VOID)
 

Parameters

This function has no parameters.

Return Values

The return value is the handle to the active window associated with the calling thread's message queue. Otherwise, the return value is NULL.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winuser.h.
  Import Library: Use user32.lib.

See Also

Keyboard Input Overview, Keyboard Input Functions, SetActiveWindow