[Closed] Intercept Menu Creation |
Post Reply |
Author | |
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
Posted: 09 June 2006 at 3:56am |
I have a project using the Dynamic Popup Sample approach - when the user clicks on a toolbar button a popup menu is displayed. I have three such buttons. I want to dynamically load entries in the menu.
I've looked at WM_XTP_TOOLBARCONTEXTMENU / ON_XTP_INITCOMMANDSPOPUP but don't see how I know which menu is being created. Once I know which menu is being created or displayed I can do the rest. |
|
Simon HB9DRV
|
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
What I am doing so far - with success - is to look at CXTPPopupBar->GetTitle() and the entries in the menu, but I'm sure there must be a better way of determining the menu.
|
|
Simon HB9DRV
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, you can check pPopupbar->GetControlPopup()->GetID() to check what button was pressed. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
Thanks - that's it. If a menu then this is -1 so I look at the caption.
Cheers ! |
|
Simon HB9DRV
|
|
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 |