Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How can let menu bar can't be dragged and moved ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How can let menu bar can't be dragged and moved ?

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


Joined: 23 January 2009
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote siwen Quote  Post ReplyReply Direct Link To This Post Topic: How can let menu bar can't be dragged and moved ?
    Posted: 17 April 2009 at 3:49am
How can let menu bar can't be dragged and moved ?  thks
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: 20 April 2009 at 2:34am
Hi,
pToolBar->EnableDocking( 0);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ReyesRP View Drop Down
Groupie
Groupie


Joined: 30 January 2008
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote ReyesRP Quote  Post ReplyReply Direct Link To This Post Posted: 18 June 2009 at 4:21pm
It still will not be totally immobile. If you move a toolbar above it, the menu will move down. Any way to make it always topmost?
Back to Top
McMustard View Drop Down
Newbie
Newbie


Joined: 17 September 2009
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote McMustard Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2009 at 4:37pm
I had this question as well.  I found the solution to be (because I did not have a CXTPToolBar pointer):

  pCommandBar->SetFlags(0, xtpFlagFloating|xtpFlagAlignTop|xtpFlagAlignLeft|
      xtpFlagAlignRight|xtpFlagAlignBottom);
  pCommandBar->SetShowGripper(FALSE);
(where pCommandBar is a CXTPCommandBar*)

The SetFlags call disables floating and limits docking to the top section.  Specifying removal of xtpFlagAlignTop prevents the user from dragging the menu bar up and down within the top docking area.  The SetShowGripper call removes the gripper, visually indicating to the user that the bar is fixed.  Also, it seems that the absence of the gripper gives the menu bar its own row.

Moving a toolbar around can displace the menu, however.  There doesn't seem to be a way to stop that.  But it does seem to mimic Visual Studio 2008's behavior, which seems like a reasonable standard, for my use anyway.

(This is a relatively old thread, but it's the only relevant one I found in searching, maybe someone will find it useful)
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.047 seconds.