Click to See Complete Forum and Search --> : triggered app on top


rodica
May 19th, 1999, 12:30 PM
I have an MDI MFC app. I use ShellExecute to trigger the Paint executable from my program.
The problem is that as soon as I clik the mouse in my app, the Paint window goes under my app's main window. Is there a way to keep it on top with my other windows in the program?

Eugene N
July 22nd, 1999, 10:25 AM
Can be so:

void CMainFrame::OnPaintStarted()
{
CWnd* pPaint = CWnd::FindWindow( "MSPaintApp", NULL );
if (pWnd)
{
pWnd->SetWindowPos( this, 0,0,0,0,
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW );
}
}