CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    14

    OnContextMenu ain't being called

    I have

    class CMyTreeCtrl : CTreeCtrl

    Which I need to display Right-Click popup menus. However my OnContextMenu() handler is not being called when I right-click in the tree control.

    Can anyone tell me why this handler is not being called? I can get my menu to popup by catching Right-button down events, but it aint working just right.

    Shouldn't the popup menu be displayed from within OnContextMenu()?

    Thanks,
    Jaime




  2. #2
    Join Date
    Apr 1999
    Posts
    15

    Re: OnContextMenu ain't being called

    WM_CONTEXTMENU message is generate from WM_RBUTTONDOWN and WM_RBUTTONUP. Sometimes, the WM_RBUTTONUP message may not send to the control in a dialog box, so you may need to process the WM_CONTEXTMENU in the dialog box window.

    1st

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured