Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - disable toolbar menu item under Toolbars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

disable toolbar menu item under Toolbars

 Post Reply Post Reply
Author
Message
Joe Brown View Drop Down
Newbie
Newbie


Joined: 01 March 2004
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote Joe Brown Quote  Post ReplyReply Direct Link To This Post Topic: disable toolbar menu item under Toolbars
    Posted: 20 May 2004 at 9:13pm
I have an MDI app and am using the default menu. I added a toolbar with the code below:


m_pBar = (CXTPToolBar*) pCommandBars->Add(_T("My bar"), xtpBarTop);
if (!m_pBar || !m_pBar->LoadToolBar(IDR_MYBAR))
{
    TRACE0("Failed to create toolbar\n");
    return -1;
}


It appears fine and can be turned on and off. What I can't figure out is how to disable the menu item. I parse the menu structure and get command bar for View->Toolbars, but the only entry is &Toolbar, which is what is in my resource file. The code above, however, adds any toolbar you add to View->Toolbars.

What I'm trying to do is show/hide a toolbar based upon a pane being visible. My panes appear in View, and they are being shown/hidden correctly along with the corresponding toolbar, but not the entry under View->Toolbars.

Edited by Joe Brown
Back to Top
SuperMario View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 22 October 2004 at 9:05am
Make sure the ID for your the View->Toolbars is 59392.  If you do not want the toolbars to be listed automatically, then you will have to manually add and remove them from your menu and change the ID of View->Toolbars to something other than 59392.
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.047 seconds.