Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - [Closed] Intercept Menu Creation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[Closed] Intercept Menu Creation

 Post Reply Post Reply
Author
Message
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Topic: [Closed] Intercept Menu Creation
    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
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post 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
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: 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
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post 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
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.172 seconds.