Print Page | Close Window

disable toolbar menu item under Toolbars

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=767
Printed Date: 07 November 2025 at 1:08am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: disable toolbar menu item under Toolbars
Posted By: Joe Brown
Subject: disable toolbar menu item under Toolbars
Date 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.



Replies:
Posted By: SuperMario
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net