Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - ID_VIEW_TOOLBAR CmdUI
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ID_VIEW_TOOLBAR CmdUI

 Post Reply Post Reply
Author
Message
yossi View Drop Down
Newbie
Newbie


Joined: 15 January 2008
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote yossi Quote  Post ReplyReply Direct Link To This Post Topic: ID_VIEW_TOOLBAR CmdUI
    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
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2008 at 1:40am
Hi,
You need disable one of toolbar or whole View->ToolBar popup?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
yossi View Drop Down
Newbie
Newbie


Joined: 15 January 2008
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote yossi Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2008 at 1:58am
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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2008 at 3:27pm
Hi,
 
You can call pToolBar->SetContextMenuPresent(FALSE) for this toolbar.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
yossi View Drop Down
Newbie
Newbie


Joined: 15 January 2008
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote yossi Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2008 at 4:13pm
Hi Oleg,
 
How do I obtain this (IDR_SPECIALBAR) pToolbar from pCmdUI in order to disable it using SetContextMenuPresent(FALSE)?
 
Thanks
 
 
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 February 2008 at 4:00am
You don't need CmdUI - get pointer using GetCommandBars()->GetToolBar(IDR_SPECIALBAR);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
yossi View Drop Down
Newbie
Newbie


Joined: 15 January 2008
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote yossi Quote  Post ReplyReply Direct Link To This Post Posted: 04 February 2008 at 4:39pm

Hi Oleg,

Using the SetContextMenuPresent(..) above removes the toolbar from popup alltogether. My intention was to show it as disabled menu item.
 
Thanks
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2008 at 12:37am
Hi,
 
Its difficult :( See CXTPControlToolbars::CreateToolbarMenu method. you can create class derived from CXTPControlToolbars and use it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.