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 » docking a dialog window ? Collapse All
Subject Author Date
Chris Anderson Sep 11, 2007 - 10:13 AM

I’m wondering whether I can do the same thing with prof-ui as what we did in a legacy app. Basically What we did is :
1. create a MDI frame window
2. create a win32 dialog window ( and its children )
3. subclass the win32 dialog window with a class derived from CControlBar
4. now you can dock the dialog window inside the MDI frame window

During the migration, we created the MDI frame window as a CFrameWnd, and subclassed the win32 dialog window with a class derived from CExtWA < CExtNCW<CWnd> >. Is it doable to somehow dock a window like this? Do you have any recommendation ?

Thanks

Chris Anderson Sep 12, 2007 - 5:53 PM

this child/parent approach seem to be working, I can dock the dialog window while all the controls on the dialog box still works. This is great.

One question: there is a title bar on the mini frame window, is there any way to turn this off ? I tried different styles of the CExtControlBar but not able to get rid of it, any suggestion ?

Thanks

Technical Support Sep 13, 2007 - 6:02 AM

You can create a control bar without the CBRS_GRIPPER style or remove this style from the control bar that has already been created. As a result the caption of the floating mini frame and the caption of the docked control bar will disappear. This is the same as overriding the CExtControlBar::IsBarWithGripper() virtual method and returning false from it. We have no ready-to-use option for removing the floating mini frame’s caption only. Besides a control bar without the caption is unusable and the user will be unable to redock it.

Technical Support Sep 11, 2007 - 12:09 PM

The CExtControlBar window requires only one window to be created as its child window and it resizes this child so that the child window is stretched to cover the entire client area of the control bar. So your approach of subclassing is not applicable, probably even if your native Win32 dialog window contains only one child control. Please simply create your win32 dialog as a child of the CExtControlBar window or move it into this control bar using the SetParent() API.

Chris Anderson Sep 11, 2007 - 2:48 PM

thanks, I just looked at SDI_dynamicbars sample, it’s the same approach, a CExtDynamicBar as the parent

Technical Support Sep 12, 2007 - 12:26 PM

In the case of dynamic control bars, you should also create your window as a child of the dynamic control bar.