1

Topic: WTL custom CListBox does not catch window messages

I try to create  ListBox with support Drag'n'Drop

It is used in ActiveX, therefore ATL/WTL



Title such



class CDragDropListBox: public CWindowImpl <CDragDropListBox, CListBox> 
{ 
    typedef CWindowImpl <CDragDropListBox, CListBox> _baseclass; 
public: 
    CDragDropListBox (); 
    virtual ~CDragDropListBox (); 
    DragDropManager* ddManager; 
public: 
    BEGIN_MSG_MAP (CDragDropListBox, CListBox) 
        MESSAGE_HANDLER (WM_LBUTTONDOWN, OnLButtonDown) 
        MESSAGE_HANDLER (WM_LBUTTONUP, OnLButtonUp) 
        MESSAGE_HANDLER (WM_MOUSEMOVE, OnMouseMove) 
        MESSAGE_HANDLER (WM_CREATE, OnCreate) 
    END_MSG_MAP () 


    LRESULT OnLButtonDown (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 
    LRESULT OnLButtonUp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 
    LRESULT OnMouseMove (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 
    LRESULT OnCreate (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 
};



But, any message (even OnCreate) is not caught. Why?




04.07.13 00:58: It is transferred by the moderator from ' a C/C ++ ' - Kodt

2

Re: WTL custom CListBox does not catch window messages

Hello, AzurT, you wrote:

AT> I Try to create  ListBox with support Drag'n'Drop
AT> It is used in ActiveX, therefore ATL/WTL

AT> But, any message (even OnCreate) is not caught. Why?



&ETH;&middot;&ETH;&deg;&Ntilde;&ETH;&deg;&ETH;&plusmn;&ETH;&ordm;&ETH;&raquo;&ETH;&deg;&Ntilde;&ETH;&cedil;&Ntilde;&Ntilde; did not forget, hour?.
wink