![]() |
CXTTreeCtrl Context Menu |
Post Reply
|
| Author | |
webjeff
Newbie
Joined: 04 November 2006 Location: United States Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTTreeCtrl Context MenuPosted: 25 February 2007 at 5:16pm |
|
I have a CXTTreeCtrl where I want to right click on a node and have functions listed on that node.
I added a function on the command "WM_CONTEXTMENU" and that works, except you need to double right-click. I can't seem to figure out why that is, nor do I see any other ways to bring up the context menu. Any ideas why WM_CONTEXTMENU requires a double right click? Thanks Jeff |
|
![]() |
|
kstowell
Admin Group
Joined: 25 January 2003 Location: MIchigan, USA Status: Offline Points: 496 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 February 2007 at 11:19pm |
|
Hello,
Sounds like you may be using a CXTTreeView? If so there is a bug in MFC that prevents WM_CONTEXTMENU from getting fired correctly for a CTreeView or CListView derived class.
Even if you are not using a CTreeView you should be able to use the following code as a work around, add a WM_RBUTTONDOWN handler in place of your WM_CONTEXTMENU handler, for example:
Hope this helps.
Regards,
Kirk Stowell
Codejock Software
|
|
![]() |
|
Kukis
Newbie
Joined: 24 May 2006 Status: Offline Points: 11 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 February 2007 at 11:18am |
|
Or check MSDN here: |
|
![]() |
|
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 |