Print Page | Close Window

Locking 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=2808
Printed Date: 06 October 2024 at 1:27am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Locking CommandBars
Posted By: umcbrad
Subject: Locking CommandBars
Date Posted: 29 August 2005 at 4:50pm

How can I lock a CommandBar so that it cannot be moved or at least not be undocked?

Thanks,

Brad




Replies:
Posted By: Oleg
Date Posted: 30 August 2005 at 5:09am

Hi,

try
CXTPToolBar::EnableDocking



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


Posted By: umcbrad
Date Posted: 30 August 2005 at 8:52am

I see this function,  but it appears that just about the entire CommandBars class depends on the use of EnableDocking.  Also, Init CommandBars in CXTPFrameWnd calls EnableDocking, so I guess I will have to create a new frame class and override that function?

How do you suggest that I create a commandbar in a CXTPFrameWnd derived class without calling EnableDocking()?  The SetMenu and Add function is CXTPCommandBars both end up calling EnableDocking().

To me this appears like a bad way to go about it, but I'm not sure what the alternatives are.

Thanks,

Brad



Posted By: Oleg
Date Posted: 31 August 2005 at 3:38am

You must call this method for each toolbar:

 

pToolBar->EnableDocking(xtpFlagHideWrap);

pMenuBar->EnableDocking(xtpFlagStretched);

...



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



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