```
 m_pMainWnd->SetForegroundWindow(); 
m_pMainWnd->SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);

```

i used the above lines to bring one of my windows to top. But to my disappointment, nothing is happening. 
Although using <&CWnd::wndTopMost> is bringong the window to topmost, but no focus on it.
VS15, mfc