Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - don’t show context menu for toolbars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

don’t show context menu for toolbars

 Post Reply Post Reply
Author
Message
Joe Brown View Drop Down
Newbie
Newbie


Joined: 01 March 2004
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote Joe Brown Quote  Post ReplyReply Direct Link To This Post Topic: don’t show context menu for toolbars
    Posted: 21 July 2004 at 2:54pm
I'm trying to figure out how to make the context menu for toolbars not appear. I right click in the toolbar area of my app, a context menu appears with checkboxes next to the toolbars that are visible, and I can turn them on and off.
Back to Top
Slotter View Drop Down
Newbie
Newbie


Joined: 23 July 2004
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Slotter Quote  Post ReplyReply Direct Link To This Post Posted: 29 July 2004 at 8:50pm
I couldn't figure out how to do it via existing code, so I modified the library as such:

In XTPCommandBars.h, class XTP_COMMANDBARS_OPTIONS,XTP_COMMANDBARS_OPTIONS() {} block, add
     bToolBarContext = TRUE;

In XTPCommandBars.cpp, CXTPCommandBars::ContextMenu function, add
     if (!GetCommandBarsOptions()->bToolBarContext)
           return;
before
     CXTPPopupBar* pPopup = GetToolbarsPopup();

Then in your program, just do

CXTPCommandBars* pCommandBars = GetCommandBars();
pCommandBars->GetCommandBarsOptions()->bToolBarContext = FALSE;     
Back to Top
gteet View Drop Down
Newbie
Newbie


Joined: 01 April 2004
Location: United States
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote gteet Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2004 at 5:03pm
check out CXTPToolBar::SetCloseable, available in XTP 9.00
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.152 seconds.