Print Page | Close Window

[Closed] Intercept Menu Creation

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=4380
Printed Date: 27 September 2024 at 5:39pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [Closed] Intercept Menu Creation
Posted By: Simon HB9DRV
Subject: [Closed] Intercept Menu Creation
Date 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



Replies:
Posted By: Simon HB9DRV
Date Posted: 12 June 2006 at 8:44am
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


Posted By: Oleg
Date Posted: 12 June 2006 at 8:49am

Hi,

you can check pPopupbar->GetControlPopup()->GetID() to check what button was pressed.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Simon HB9DRV
Date Posted: 12 June 2006 at 8:56am
Thanks - that's it. If a menu then this is -1 so I look at the caption.

Cheers !


-------------
Simon HB9DRV



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net