28.3. The mouse wheel

Though not everyone has a wheel mouse yet, they are becoming more popular. If you don’t have one, you really should get one, as the wheel makes it a lot easier to scroll through all the files you have to look at when you’re programming. An additional good feature of some wheel mice (such as Microsoft’s high-end one) is that you can press down on the wheel to simulate a double click.

You can add a handler for WM_MOUSEWHEEL to add a method BOOL CPopView::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt). Check the Visual Studio help for the meaning of the arguments.

For our purposes, we only want the mouse wheel to scroll through the different tool types. In the Pop Framework build, the mouse wheel scrolls through all the ...

Get Software Engineering and Computer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.