Puts the thread that created the window into the foreground and activates the window.
BOOL SetForegroundWindow( );
Nonzero if the function is successful; otherwise 0.
Keyboard input is directed to the window, and various visual cues are changed for the user. The foreground window is the window with which the user is currently working. The foreground window applies only to top-level windows (frame windows or dialogs boxes).
See the example for CWnd::FindWindow.