GetForegroundWindow

This function returns the handle to the foreground window—the window with which the user is currently working.

At a Glance

Header file: Winuser.h
Windows CE versions: 1.0 and later

Syntax

HWND GetForegroundWindow(void);

Return Values

The handle to the foreground window indicates success.

See Also

SetForegroundWindow