-
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
-
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
-
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();
-
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.
-
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.