Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Restricting docking to within a control bar? Collapse All
Subject Author Date
Andrew Harding Jan 24, 2006 - 10:06 AM

I’m trying to create a tabbed control where each tab of the control would be a docking site for multiple windows.  I am able to create the tabbed control by using CExtControlBar::DockControlBarInnerOuter and CExtControlBar::DockControlBarIntoTabbedContainer.  The problem I have is that I want to restrict the CExtControlBars within each tab so that they can only dock within the current tab.  I don’t want the user to be able to dock the CExtControlBars outside of the tab, although it is ok for them to float the windows, I’ll just hide/reshow the floated windows as they switch tabs.


Do you know if / how I can restrict the docking as described above?

Technical Support Jan 26, 2006 - 11:12 AM

Your UI design looks like as folows:

1) MDI application with the MDI tab control and without any bars: no toolbars, no status bar, and no any other bars.

2) The child frames are always maximized only.

3) Each child frame has its own bars and, of course, bars of one frame cannot be docked into another one.

Is that is what you are going to code?

Andrew Harding Jan 26, 2006 - 11:42 AM

That is an accurate assessment of my program.  Since I last posted I have made a little more progress however, I decided to create a CFrameWnd and attach a CExtTabPageContainer to it.  I then create a number of additional CFrameWnds and insert one to each tab page.  Each CFrameWnd that is inserted into the tab page is a docking site for the CExtControlBars that they contain.  This seems to work except that when I resize the main window the tab pages don’t seem to resize even though I resize the tab control to fill the parent window space on resize.  The windows used to resize appropriately before they were inserted into the tab control.

Technical Support Jan 26, 2006 - 12:47 PM

We are sure that the windows correctly inserted into the tab page container will be resized and your design is really possible to implement. We guess the problem may deal with some type or something similar. Would you can send us your project so we can find out what’s wrong?

Andrew Harding Jan 26, 2006 - 3:28 PM

I fixed the problem.  I just needed to override the OnSize event for the frame containing the tab control and call RecalcLayout in that function.

Technical Support Jan 27, 2006 - 10:17 AM

That is interesting, but CFrameWnd::OnSize() invokes the RecalcLayout() virtual method if the nType parameter is not equal to SIZE_MINIMIZED. We may guess you have defined the BEGIN_MESSAGE_MAP macro in the class map incorrectly. Please check whether the second parameter of this macro is the frame window type:

BEGIN_MESSAGE_MAP( CYourChildFrameAsTabPageClass, CFrameWnd )