WindowsApi:SetWindowPos
lastmod 2018-08-17created 2016-04-132 edits
Window TopMost
// 최상위 윈도우로 설정하여 강제로 앞으로 나오게 한다.
::SetWindowPos(m_pMainWnd->m_hWnd, HWND_TOPMOST, 0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_SHOWWINDOW);
// 최상위 윈도우 속성을 제거한다. 하지만 윈도우는 다른 윈도우보다 앞에 존재한다.
::SetWindowPos(m_pMainWnd->m_hWnd, HWND_NOTOPMOST, 0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_SHOWWINDOW);
For how to use BringWindowToTop(), see here.