CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    10

    triggered app on top

    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?


  2. #2
    Join Date
    Jul 1999
    Posts
    13

    Re: triggered app on top

    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 );
    }
    }





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured