jsxyhelu
jsxyhelu

Reputation: 13

How to Response WM_MOUSEWHEEL message and scroll the windows in MFC?(vs2012)

English is not my native language; please excuse typing errors. In my MFC program,I want to Response WM_MOUSEWHEEL and scroll the windows. I have search the Google and stackoverflow,but there is not many help. SO My question is "How to Response WM_MOUSEWHEEL message and scroll the windows in MFC?(vs2012)" Many thanks! HELU

Upvotes: 1

Views: 2393

Answers (1)

kajojeq
kajojeq

Reputation: 904

Add to your MessageMap:

ON_WM_MOUSEWHEEL()

in your .h and .cpp file implement:

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

Tested fast, delta 120 means you scroll up and -120 for scrolling down.

Upvotes: 5

Related Questions