Print Page | Close Window

Single inactive button

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=16766
Printed Date: 29 November 2024 at 3:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Single inactive button
Posted By: Somnambulist
Subject: Single inactive button
Date Posted: 28 May 2010 at 12:59pm
Hi,

So in Mainfrm.cpp of my code I have a little snippet that looks like this:

     CXTPRibbonTab* pTabTables = pRibbonBar->AddTab(ID_TAB_TABLES);

     CXTPRibbonGroup* pGroupTables = pTabTables->AddGroup(ID_GROUP_TABLES);
     pGroupTables->Add(xtpControlButton, ID_FILE_DIRECTIONS)->SetWidth(90);
     pGroupTables->Add(xtpControlButton, ID_FILE_ROUTES)->SetWidth(90);
     pGroupTables->Add(xtpControlButton, ID_FILE_SERVICES)->SetWidth(90);
     pGroupTables->Add(xtpControlButton, ID_FILE_JURISDICTIONS)->SetWidth(90);
     pGroupTables->Add(xtpControlButton, ID_FILE_DIVISIONS)->SetWidth(90);
     pGroupTables->Add(xtpControlButton, ID_FILE_NODESANDSTOPS)->SetWidth(90);
     pGroupTables->Add(xtpControlButton, ID_FILE_SIGNCODES)->SetWidth(90);
     pGroupTables->Add(xtpControlButton, ID_FILE_COMMENTS)->SetWidth(90);

However, when the project is run, all the buttons are available to be pushed except for ID_FILE_JURISDICTIONS because it is greyed out.

They all have the relevant ON_COMMAND notifications and defines, but I'm unsure as to why that is the only greyed out button. Any suggestions?



Replies:
Posted By: znakeeye
Date Posted: 29 May 2010 at 5:30am
1) Look for duplicate IDs.
2) Look for ON_UPDATE_COMMAND_UI_RANGE where ID_FILE_JURISDICTIONS is caught.
3) Look for ON_UPDATE_COMMAND_UI_RANGE where ID_FILE_JURISDICTIONS may be caught.
4) Put a breakpoint inside OnCmdMsg() and wait for ID_FILE_JURISDICTIONS and see what happens with it.


-------------
PokerMemento - http://www.pokermemento.com/



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