المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : CControlBars always on top of CMDIChildWnd



C++ Programming
06-12-2009, 01:50 PM
I have some control bars (CDialogBar actually, but the problem is the same for all CControlBar derived classes) owned by my CMDIChildWnd derived class. These control bars contains document specific data.

The problem I can't seem to find a solution to is when one of these control bars is in a floating state and I have more than one document open. The floating control bar is alway on top of all CMDIChildWnd derived windows, making it difficult to know to which it actually belongs.

(This can be easily tested by just adding the toolbar from the CMainFrame to the CChildFrame class and opening a few document windows and let a toolbar float.)

The behaviour I'd like to see is that the control bar should be on top of its owning CMDIChildWnd, but below any other CMDIChildWnd that might be in front of it.

Does anyone have a clue how to do this?

I have tried SetWindowPos(&my_child_frame,...) in various places without any luck.
Maybe I could set the window style of the CMiniFrameWnd somehow?

Any ideas would be appreciated.

I run MFC (obviously) and VS2003, though I doubt that matters.

home (http://www.nilione.com)