Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Single inactive button
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Single inactive button

 Post Reply Post Reply
Author
Message
Somnambulist View Drop Down
Newbie
Newbie
Avatar

Joined: 28 May 2010
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Somnambulist Quote  Post ReplyReply Direct Link To This Post Topic: Single inactive button
    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?
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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/
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.296 seconds.