Skip to main content

Posts

Showing posts with the label Bring to Top

Bring MFC dialog window to Top of all Windows

Hello Folks !!!! Lately i was developing a Windows CE Auto Version check application and i need to warn User before i trigger OS upgrade so Auto close warning dialog is expected to be top-most window. Following code does the magic. All you need to do is, place this code in OnInitDialog or whereever you want. CWnd* MainWnd= AfxGetMainWnd();   MainWnd->SetWindowPos (&MainWnd->wndTopMost ,0,0,0,0, SWP_NOMOVE| SWP_NOSIZE| SWP_SHOWWINDOW); Thats it!!!!!!! Not a big deal :)