It is very easy using
nFlags
variable. Here is the sample code:
BOOL CClickScrollingDlg::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)<br />
{<br />
if(nFlags == MK_MBUTTON)<br />
{<br />
if(zDelta>0)<br />
MessageBox(L"UP!!!");<br />
else if(zDelta<0)<br />
MessageBox(L"DOWN!!!");<br />
}<br />
<br />
return CDialog::OnMouseWheel(nFlags, zDelta, pt);<br />
}