Combobox context menu on toolbar |
Post Reply |
Author | |
Chet Desmond
Groupie Joined: 27 August 2010 Status: Offline Points: 11 |
Post Options
Thanks(0)
Posted: 08 February 2011 at 9:44am |
I have a CXTPControlComboBox-derived control on a toolbar. Right-clicking on the control brings up the toolbar's standard context menu (i.e. the menu with the names of the toolbars and the Customise... option). For my control I'd like to show my own context menu instead, a little like the edit control brings up a Cut,Copy,Paste menu.
I suspect this is simple to achieve, but right now I can't figure it out. What steps do I need to take to have my control respond to the correct messages?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You can override void CXTPCommandBars::ContextMenu(CXTPToolBar* pToolBar, CPoint point) or catch WM_XTP_TOOLBARCONTEXTMENU in CMainFrame and update CXTPPopupBar* pPopup (lParam). See this method in sources.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Chet Desmond
Groupie Joined: 27 August 2010 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
Thanks Oleg . I've just stumbled across InitCommandBars which looks promising.
I don't suppose there are any plans for some material aimed at novices (a book, for example) is there? It's like looking for a needle in haystack sometimes with the help files.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |