Hi,
I am having a com dll object .
This object is used in one of my applications. This object is having scrollbar in it.

I have added message handler for WM_MOUSEWHEEL. But still I am no able to receive this event in my COM object.

My COM object is already responding to WM_VSCROLL, WM_HSCROLL messages.

I added a new message handler for WM_SETFOCUS message similar to the way I added for WM_MOUSEWHEEL. I am able to execute the functions in OnSetFocus(). But my code in OnMouseWheel() function is not getting executed.

Any idea why I am not able to receive WM_MOUSEWHEEL message in my COM object. Can you please help me solve this problem.

Code snippet i used is given below.


In Com DLL .h file
-----------------------------
BEGIN_MSG_MAP(CCtl)
MESSAGE_HANDLER(WM_HSCROLL, OnHScroll)
MESSAGE_HANDLER(WM_VSCROLL, OnVScroll)
MESSAGE_HANDLER( WM_SETFOCUS,OnSetFocus)
MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel)
END_MSG_MAP()


private:
LRESULT OnHScroll(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnVScroll(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

Also Implemented these functions in the cpp file.

For WM_MOUSEWHEEL do I need to handle it in a different way?Please guide me.

Thanks in Advance
Vin