GetForegroundWindow

  HWND GetForegroundWindow(void)    

The GetForegroundWindow function returns the handle of the window in the foreground (the window currently receiving keyboard input).

Parameters

This function has no parameters.

Return Value

The return value is the handle of the window in the foreground.

See Also

SetForegroundWindow