CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 1999
    Location
    Texas, USA
    Posts
    568

    MDI window question

    In order to simualate a MDI application within a MDI application, I had to create the windows myself and keep track of them. No problem, works great, sort of. I am sure learning to appreciate what MFC does for the programmer.

    Can anybody answer some or all of the following questions?

    1) When I click on a child window, how to make it appear topmost? I have tried BringWindowToTop(), RedrawWindow().
    2) How to activate the child window to redraw the caption bar the active color?
    3) Any other question that could be asked to deal with multiple windows that I will have to take care of myself.

    Any help would be very appreciated,

    Wayne



  2. #2
    Join Date
    Apr 1999
    Location
    Germany
    Posts
    418

    Re: MDI window question

    Hi Wayne,

    sorry, but I can only help you with the second question. If you send a WM_NCACTIVATE message to the child window it should repaint his title bar.

    Martin

  3. #3
    Join Date
    May 1999
    Posts
    1

    Re: MDI window question

    If you want send the CMDIChildWnd at the topmost you can use

    pFrame->MDIActivate();

    where pFrame cane be recoverde using:

    CMDIChildWnd* pFrame= (CMDIChildWnd*)pView->GetParent();



  4. #4
    Join Date
    May 1999
    Location
    Texas, USA
    Posts
    568

    Re: MDI window question

    Thanks for the response. But they are not CMDIChildWnds they are just CWnd objects. I tried to use CMDIChildWnd but they have to reside inside CMDIFrameWnd, or MFC goes nuts.


  5. #5
    Join Date
    May 1999
    Location
    Texas, USA
    Posts
    568

    Re: MDI window question

    Thanks for the response. After my initial post, I played around with a few window styles. I think I am now getting the results that I want.


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