Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Locking CommandBars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Locking CommandBars

 Post Reply Post Reply
Author
Message
umcbrad View Drop Down
Newbie
Newbie


Joined: 26 April 2005
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote umcbrad Quote  Post ReplyReply Direct Link To This Post Topic: Locking CommandBars
    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

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: 30 August 2005 at 5:09am

Hi,

try
CXTPToolBar::EnableDocking

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
umcbrad View Drop Down
Newbie
Newbie


Joined: 26 April 2005
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote umcbrad Quote  Post ReplyReply Direct Link To This Post 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

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: 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
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.125 seconds.