Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Add/Remove buttons on CommandBars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Add/Remove buttons on CommandBars

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

Joined: 07 March 2006
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote rag6419 Quote  Post ReplyReply Direct Link To This Post Topic: Add/Remove buttons on CommandBars
    Posted: 07 March 2006 at 7:06pm
I'm sure it's something very simple, but I have several toolbars and a few of them have the buttons disabled when you go to remove them.  I create them in the same manner and have ON_COMMAND and ON_UPDATE_COMMAND_UI for them.

Back to Top
Raj.krishnan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 January 2006
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote Raj.krishnan Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2006 at 3:23am

 Hi ,

   you can set the visisble state of the buttons to false by finding the control and then do

RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0, reposQuery   , rcClientNow, NULL, FALSE);


  RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);

   Toolbar will automatically reset with visible buttons.

 

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.125 seconds.