|
-
May 27th, 2006, 06:53 AM
#1
Not getting Mouse Wheel event
Hi all,
I have an existing COM object in which it is already getting WM_VSCROLL events. I would like to receive WM_MOUSEWHEEL events too.
I have implemented mouse wheel functionality similar to VScroll functionality.
But I am not able to receive mouse wheel functionality.
I t would be a great help for me, if some one can help me in solving this problem for me. Code snippet is given below.
Thanks in Advance
Vin
Code Changes
Added message handler function in between BEGIN_MSG_MAP and END_MSG_MAP
MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel)
Declared the mouse wheel function as below.
LRESULT CCtl::OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
Its implementation is as given below.
LRESULT CCtl::OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
UINT code = LOWORD((UINT)wParam);
int pos = HIWORD((int)wParam);
MessageBox("OnMouseWheel", "OnMouseWheel",MB_OK );
return 0;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|