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 » Conditional toolbars? Collapse All
Subject Author Date
Daisy Peterson May 1, 2008 - 9:52 AM

In our application some of our features require a separate license to utilize.  These features may have a toolbar associated with them.  If I save my document to a file, we save the state of the workspace as well, using your control bar serialize functions.  If we were to take that document file and give it to another user, who doesn’t have one of the licenses required, he is missing one of the toolbars.  Upon calling the serialization functions during the document load, we get exceptions that the current number of toolbars in the application does not match what was serialized, and the loading fails.  Is there a way in the Prof-UIS system to indicate that a toolbar/docked window is optional?  Save its state, but if it doesn’t exist on reload, just ignore it and load the rest?


 


Kevin Murray

Technical Support May 2, 2008 - 2:20 AM

You can create all the set of toolbars in both versions. But you can hide the unwanted toolbars and seem to be a solution.In this case, you should also set their CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property to false in order to remove the corresponding menu items that show/hide toolbars (these items are present in built-in context menus displayed over frame window area)s. You may need to have two main frame menu resources for both versions of your application or you can support one full version menu and remove un-needed commands dynamically by handling a CExtPopupMenuWnd::g_nMsgPrepareOneMenuLevel registered message as it is demonstrated in Prof-UIS samples.