Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Prevent a tool from being customized
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Prevent a tool from being customized

 Post Reply Post Reply
Author
Message
Marek View Drop Down
Groupie
Groupie


Joined: 02 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marek Quote  Post ReplyReply Direct Link To This Post Topic: Prevent a tool from being customized
    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.

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Marek View Drop Down
Groupie
Groupie


Joined: 02 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marek Quote  Post ReplyReply Direct Link To This Post 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.

 

 

 

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