Print Page | Close Window

Prevent a tool from being customized

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=1749
Printed Date: 12 December 2024 at 7:34am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Prevent a tool from being customized
Posted By: Marek
Subject: Prevent a tool from being customized
Date Posted: 03 February 2005 at 2:57pm

Hi folks (oops, originally posted this in the MFC forum, I meant to post here),

Is there a way to prevent an individual tool and an entire toolbar from showing up in the Customization dialog?

I would think that if I set the the toolbar's Customization flag to FALSE it wouldn't show, and I would think that if the tool's "XTPFlagNoMovable" to TRUE it wouldn't show....but  in fact both the toolbar and the tools do appear in the Customization dialog.

Any help would be appreciated.

Thanks.




Replies:
Posted By: Oleg
Date Posted: 04 February 2005 at 5:18am

Good way is to create new menu template for tools you want to appear in Customize dialog. And use it in AddCategories call.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Marek
Date Posted: 04 February 2005 at 3:27pm

Thanks for the reply, but I'm not sure where the AddCatergories call is (I'm using the ActiveX, no source code for the Customization dialog at my disposal)....

I've done some reading on other posts about the Designer Controls collection.... this collection appears to hold the controls that eventually appear in the Customization dialog.

So my tentative plan is to design the toolbars and menu etc in the Designer (both customizable and non-customizable controls), then on start-up load the .xcb file, remove all from the Designer controls, then add back in the controls that I want customizable. Seems ok, but it would be a lot easier if there was a way to remove a single item from the Designer Controls collection (all I see is Add, DeleteAll, and Find methods).

Once all this is done I'd have some controls in the Designer collection that would only be used for Customization. For interaction with controls (ie setting enabled/disabled, captions, state) I'd use Find on the various ControlBars Collections of tools, not Find on the Designer Controls collection or I'd have to make sure the Update event handler keeps those new properties set on the controls.

Can someone please tell me if I'm on the right track? Or if you have any other ideas? 

I'm sorry if I'm not understanding a really basic concept of the control but I have not been able to find any documentation on the overall structure of the CommandBars.

Thanks a lot.

 

 

 




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