![]() |
How to change toolbars at runtime |
Post Reply ![]() |
Author | |
Luigi ![]() Newbie ![]() ![]() Joined: 28 July 2008 Location: Italy Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 28 July 2008 at 1:04pm |
Hi,
I'm porting my application to XTP and I've a problem. My application has a "explorer-like" layout with a tree on the left part and a view on the right. There exists three types (read classess) of view and each one is bound to a specific menu and toolbar layout. The first part about the menu exchange was easy to port, with the following code: CXTPCommandBars* pCommandBars = pFrameWnd->GetCommandBars(); CXTPMenuBar *pMenuBar = pCommandBars->GetMenuBar(); pMenuBar->LoadMenu( &menu); where menu is the CMenu object with the menu associated to the view. For the second part, I'd like to share toolbars definitions among the views and let the user to customize the toolbar contents and number in a per application basis and toolbar visibility in a per view basis. For example, if I have two toolbars, in the view type 1 the user could see them both, in view type 2 he could see only the first and in view type 3 he could see only the second. I don't konw how to proceed. Help me. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Create all 3 toobars, but hide and show them when you switch views.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
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 |