SetActiveWindow

2.x

  HWND SetActiveWindow(hwnd)    
  HWND hwnd; /* handle of window to activate */

The SetActiveWindow function makes the specified top-level window the active window.

Parameters

hwnd

Identifies the top-level window to be activated.

Return Value

The return value identifies the window that was previously active, if the function is successful.

Comments

The SetActiveWindow function should be used with care, since it allows an application to arbitrarily take over the active window and input focus. Normally, Windows takes care of all activation.

See Also

GetActiveWindow, SetCapture, SetFocus