Microsoft Windows CE 3.0  

SetForegroundWindow

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function puts the thread that created the specified window into the foreground and activates the window.

BOOL
SetForegroundWindow( HWND
hWnd
);

Parameters

hWnd
[in] Handle to the window that should be activated and brought to the foreground.

Return Values

Nonzero indicates that the window was brought to the foreground. Zero indicates that the window was not brought to the foreground.

Remarks

The foreground window is the window at the top of the z-order. It is the window that the user is working with. In a preemptive multitasking environment, you should generally let the user control which window is the foreground window.

The thread that owns the window is not given a priority boost.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

GetForegroundWindow, SetActiveWindow