Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Retreiving the CXTPControlButton on the Onclick
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Retreiving the CXTPControlButton on the Onclick

 Post Reply Post Reply
Author
Message
BadJerry View Drop Down
Newbie
Newbie


Joined: 22 July 2005
Location: United Kingdom
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote BadJerry Quote  Post ReplyReply Direct Link To This Post Topic: Retreiving the CXTPControlButton on the Onclick
    Posted: 03 July 2013 at 7:54am
Hello,

I have derived  CXTPControlButton (let's call it my CXTPMyDynamicMenu) so I could have a dynamic way of filling menus after a right click... 
the same class shows 3 levels of sub menu-items.

In  CMainFrame::OnCreateControl, I create a CXTPMyDynamicMenu: that works (although my menu is shown on a view, I do not like to have to add some code in CMainFrame... but that's not important)

Is there anyway to know on the OnClick event (well it's an On_COMMAND or ON_COMMAND_RANGE) which CXTPMyDynamicMenu object has been selected? and its parent? 
Something like "GetCurrentClickedMenuButton()"...
I know I can  get the ID of the button but I do not want to have to reserve hundreds of IDS...

Thanks in advance,
Jerry
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.199 seconds.