Print Page | Close Window

Add/Remove buttons on CommandBars

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=3742
Printed Date: 30 September 2024 at 3:30am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Add/Remove buttons on CommandBars
Posted By: rag6419
Subject: Add/Remove buttons on CommandBars
Date 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.




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

 




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