SetActiveWindow
The SetActiveWindow
function activates a window.
HWND SetActiveWindow(
HWND hWnd |
// handle of window
to activate |
); |
|
Parameters
hWnd
Identifies
the top-level window to be activated.
Return Values
If the
function succeeds, the return value is the handle of the window that was
previously active.
Remarks
The SetActiveWindow
function activates a window, but not if the application is in the background.
The window will be brought into the foreground (top of Z order
If the window
identified by the hWnd parameter was created by the calling thread, the
active window status of the calling thread is set to hWnd. Otherwise,
the active window status of the calling thread is set to NULL.
The SetForegroundWindow
See Also