CWnd::SetForegroundWindow BOOL SetForegroundWindow( );Return ValueNonzero if the function is successful; otherwise 0.ResPuts the thread that created the window into the foreground and activates the window. 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
BOOL SetForegroundWindow( );Return ValueNonzero if the function is successful; otherwise 0.ResPuts the thread that created the window into the foreground and activates the window. 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
m_pMainWnd->SetWindowPos(&m_pMainWnd->wndTopMost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);