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 General Discussion » CExtControlBar docking styles serialization Collapse All
Subject Author Date
Daniel Tiedy Jan 6, 2004 - 2:21 PM

Shouldn’t the docking states (m_dwDockStyle) be serialized with the ControlBar’s other data members?  I allow the user to make any ControlBar not dockable.  This is very handy sometimes, but the problem is when the software restarts the m_dwDockStyle is not loaded.  Also the user can setup hotkeys for recalling different controlbar position states, and this would be nice to retain the "Allow Docking" m_dwSockingStyle states.  What are your thoughts?

Sergiy Lavrynenko Jan 9, 2004 - 9:22 AM

Dear Daniel,

Thank you for a good question.

Prof-UIS uses two standard MFC’s classes CDockState and CControlBarInfo to save positions of the following CControlBar-derived objects: CExtMenuControlBar, CExtToolControlBar, CExtStatusControlBar and CExtDockBar (parent for toolbars). The last two bars are typically never redockable. The state of any bar listed above is stored in the CControlBarInfo class. Please note that CControlBarInfo does not keep their docking styles. This means that any MFC bar created as non-redockable can only be statically aligned with one side of the frame window. To save/restore the docking styles of such bars manually would be not enough because positions of non-redockable bars also depend on their creation order (i.e. Z-order of frame’s child windows). MFC never changes Z-order of status bars, dock bars and other non-redockable bars. Their Z-order remains invariable from the moment they have been created. Therefore, I need some more details on your application: what kind of bars you use, their relative positions and etc.

Best regards, Sergiy.