Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CWnd isnt generating mousewheel events

735 views
Skip to first unread message

Carpii

unread,
Oct 17, 2005, 12:39:56 PM10/17/05
to
Hi,
I have a custom CWnd control, using VC6.0
I added a MouseWheel handler to the control

afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);

and a function body,

BOOL CTab::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
{
MessageBeep(0);
return 0;
}

When I breakpoint MessageBeep(0), i see that it is not being called
even when I mousewheel over the CWnd control.
Is there anything else I need to do to handle these messages in my
custom control.

Thanks
Carpii

CheckAbdoul

unread,
Oct 17, 2005, 12:47:33 PM10/17/05
to
Make sure you have the following added to the BEGIN_MESSAGE_MAP(...) ,
END_MESSAGE_MAP() block.

ON_WM_MOUSEWHEEL()

--
Cheers
Check Abdoul
-----------------

"Carpii" <carp...@gmail.com> wrote in message
news:1129567196.8...@z14g2000cwz.googlegroups.com...

Minus

unread,
Oct 18, 2005, 4:35:53 AM10/18/05
to
Make sure the window has the focus, say, by clicking on it.

Be well.

sudantha

unread,
Dec 2, 2011, 5:21:41 AM12/2/11
to
Make sure WS_TABSTOP style is set when creating. Wouldn't work without it
0 new messages