contextmenu on treeviewctrl in wtl
-
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? :((
-
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? :((
-
Where is your message handler, in the treeview? Have you chained the context menu messages?
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?