Print Page | Close Window

Toolbar button selection menu is disabled

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=1337
Printed Date: 07 November 2025 at 1:06am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Toolbar button selection menu is disabled
Posted By: jeffcmj
Subject: Toolbar button selection menu is disabled
Date Posted: 28 October 2004 at 7:22am

Hi,

I added a toolbar at run time like this:

...
ON_XTP_EXECUTE_RANGE(ID_TOOLBAR_B1,ID_TOOLBAR_B6,OnButtons)
...

CXTPToolBar* pBar1 = (CXTPToolBar*)pCommandBars->Add(_T("test"), xtpBarTop);
 if(pBar1)
 {
  pBar1->SetIconSize(CSize(24,24));
  pBar1->SetButtons(toolbar1_buttons,6);
 }
...

I have two questions:

1. The toolbar buttons are disabled by default, until I add a  ON_COMMAND_RANGE(ID_TOOLBAR_B1,ID_TOOLBAR_B6,OnFavorit e) . So I want to know what's the difference between the command in XTP_EXECUTE handler and COMMAND_RANGE handler.

2. After I added the ON_COMMAND_RANGE, the toolbar buttons are enable, but the toolbar's customize menu (used to add/remove a button) is still disabled, I can not add/remove any buttons through that menu.

I am using XT 8.6.




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