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

Disable customisation problem

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


Joined: 30 April 2004
Location: United Kingdom
Status: Offline
Points: 83
Post Options Post Options   Thanks (0) Thanks(0)   Quote brianh Quote  Post ReplyReply Direct Link To This Post Topic: Disable customisation problem
    Posted: 12 September 2005 at 4:15am

Hi, if you set the xtpFlagNoMovable option for a toolbar control it stops the user from being able to move or delete the control via the toolbar customisation dialog (as expected), but it still allows them to hide the control from the pop-out menu!

Also, I hide/show some toolbar controls depending on the context in the view, these controls are all marked as not movable, but when the 'Reset' option is chosen from the pop-out menu all controls, including those marked as not movable are 'restored' to the toolbar! 

This is a real problem for me, can you please change this so that controls that are marked as not movable don’t appear in the pop-out menu and that they also don’t get affected by choosing ‘Reset’ from this menu?  After all, if they can't be customised by the user, and they are currently hidden, then it must be because the programmer want's it that way.  

These changes would make things more consistent and would give us programmers the kind of control we need over which parts of a toolbar the user can and can’t customise.   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: 13 September 2005 at 2:40pm

1. Thank you good suggestion! Added

You can patch sources till next release.

in CXTPToolBar::BuildCustomizePopup

add

  if (pControl && ((pControl->GetFlags() & xtpFlagNoMovable) != 0))
  {
   continue;
  }

 

2. You can override virtual void CXTPToolaBar::Reset(); and hide controls again.

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
brianh View Drop Down
Groupie
Groupie


Joined: 30 April 2004
Location: United Kingdom
Status: Offline
Points: 83
Post Options Post Options   Thanks (0) Thanks(0)   Quote brianh Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2005 at 5:35am
Thanks Oleg, that fixed it.   I have also derived my own toolbar class and overridden the Reset() method as you suggested, I now restore the hidden state for any non-customisable hidden controls after calling the base class version and that seems to work fine. Thanks again. 
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.156 seconds.