![]() |
ID_VIEW_TOOLBAR CmdUI |
Post Reply ![]() |
Author | |
yossi ![]() Newbie ![]() Joined: 15 January 2008 Location: United States Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() Posted: 31 January 2008 at 6:28pm |
Hi,
I'm sure this is easy. What's the Xtreme way to disable a menu item (which lists all toolbars automatically) when the View -> Toolbars pops up
Thanks
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
You need disable one of toolbar or whole View->ToolBar popup?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
yossi ![]() Newbie ![]() Joined: 15 January 2008 Location: United States Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
Hi Oleg,
I only need to disable one of the Toolbars in the popup.
Basically one of the Toolbars is only applicable in a particular view. I don't want it to be available to the user in other views.
As you imagine, this View -> Toolbars popup was populated automatically (MFCs?); I didn't define any command ids for each of the listed Toolbar in the popup.
For example one of Toolbar I wish to disable was created with resource id of IDR_SPECIALBAR.
Thanks for your time.
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
You can call pToolBar->SetContextMenuPresent(FALSE) for this toolbar.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
yossi ![]() Newbie ![]() Joined: 15 January 2008 Location: United States Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
Hi Oleg,
How do I obtain this (IDR_SPECIALBAR) pToolbar from pCmdUI in order to disable it using SetContextMenuPresent(FALSE)?
Thanks
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
You don't need CmdUI - get pointer using GetCommandBars()->GetToolBar(IDR_SPECIALBAR);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
yossi ![]() Newbie ![]() Joined: 15 January 2008 Location: United States Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
Hi Oleg, Using the SetContextMenuPresent(..) above removes the toolbar from popup alltogether. My intention was to show it as disabled menu item.
Thanks
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Its difficult :( See CXTPControlToolbars::CreateToolbarMenu method. you can create class derived from CXTPControlToolbars and use it.
|
|
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 |