|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| user32.lib
| Header File
| winuser.h
| Unicode
| No
| Platform Notes
| None
|
|
|
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 application is in the foreground when it sets the activation.
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 window function, on the other hand, activates a window and forces it into the
foreground. An application should only call SetForegroundWindow if it needs to display critical errors or information that needs the user's
immediate attention .
See Also
GetActiveWindow, SetForegroundWindow, WM_ACTIVATE
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|