Adding dynamic Toolbars... |
Post Reply |
Author | |
guiuser1
Groupie Joined: 17 November 2015 Status: Offline Points: 34 |
Post Options
Thanks(0)
Posted: 25 November 2015 at 2:52pm |
I'm a bit stuck in how to add toolbars dynamically for a MDI application.
Depending on the settings, we optionally want to display a new toolbar... We are so far a bit puzzled about how to go about this. Any pointers? |
|
guiuser1
Groupie Joined: 17 November 2015 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
Found a solution but not sure this is the expected one.
We create a optional toolbar in the CMainFrame::OnCreate like normal, set the toolbar to be non-visible: pToolBar->SetVisible(FALSE); Then when a document is loaded, and with the proper settings in place, we force that toolbar to be visible by call pToolBar->SetVisible(TRUE); As a side affect (I believe this is a bug), when saving and restoring the toolbars via the CXTPPropExchangeXMLNode, the toolbar becomes visible all the time, when the app is reloaded. To fix that we had to put an additional call to pToolBar->SetVisible(FALSE); at the end of CMainFrame::ExchangeLayout(..) It works but seems a bit untidy... Suggestions? |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |