Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. contextmenu on treeviewctrl in wtl

contextmenu on treeviewctrl in wtl

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++com
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Steffen
    wrote on last edited by
    #1

    Hello, i have a activex control. it is only a treeviewctrl using wtl. now i implemented a contextmenu handler, but if i clicked on a menu point nothing happens. in my message map i have: COMMAND_ID_HANDLER (ID_OF_MENU_POINT, OnMyMenu) What is my mistake? :((

    L 1 Reply Last reply
    0
    • S Steffen

      Hello, i have a activex control. it is only a treeviewctrl using wtl. now i implemented a contextmenu handler, but if i clicked on a menu point nothing happens. in my message map i have: COMMAND_ID_HANDLER (ID_OF_MENU_POINT, OnMyMenu) What is my mistake? :((

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Where is your message handler, in the treeview? Have you chained the context menu messages?

      L 1 Reply Last reply
      0
      • L Lost User

        Where is your message handler, in the treeview? Have you chained the context menu messages?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        The massage handler is in my COM class (header file). class ATL_NO_VTABLE CMyClass : public CComObjectRootEx, public CComCompositeControl, ..... BEGIN_MSG_MAP(CMyClass ) CHAIN_MSG_MAP(CComCompositeControl) ...... ...... MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu) COMMAND_ID_HANDLER(ID_CHECKSERVER,OnDelete) COMMAND_ID_HANDLER(ID_CHECK,OnDel) END_MSG_MAP() LRESULT OnDelete(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { MessageBox("asdsdasd"); return S_OK; } What do mean with chaining the messages?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups