The information in this article applies to:
SUMMARY
By default, each thread has an independent input state (its own active
window, its own focus window, and so forth). SetActiveWindow() always
logically sets a thread's active window state. To force a window to the
foreground, however, use SetForegroundWindow(). SetForegroundWindow()
activates a window and forces the window into the foreground.
SetActiveWindow() always activates, but it brings the active window into
the foreground only if the thread is the foreground thread.
MORE INFORMATION
On Windows 98 and Windows 2000, SetForegroundWindow is subject to limitations.
On Windows 98, if a nonforeground thread calls SetForegroundWindow, passing the handle of a window that was not created by the calling thread, the window is not flashed on the taskbar.
This method allows SetForegroundWindow on Windows 98 and Windows 2000 to behave the same as Windows 95 and Windows NT 4, respectively, for all applications. The setup application should warn the user that this is being done so that the user isn't surprised by the changed behavior.
On Windows 2000, the SystemParametersInfo call fails unless the calling thread has can change the foreground window, so this must be called from a setup or patch application. Additional query words:
Keywords : kbNTOS kbWinOS2000 kbSDKWin32 kbGrpUser kbWinOS kbWndw |
Last Reviewed: January 25, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |