December 2002
Intermediate to advanced
648 pages
19h 53m
English
Windows generates a number of mouse-related messages, including WM_MOUSEMOVE and WM_ONLBUTTONDOWN. MFC handles these two with message handlers normally called OnMouseMove and OnLButtonDown.
The programmer is free to decide which class is to hold the handler methods. One way to do this is to open the Class View and to right click on the name of class that is supposed to handle the mouse message. In Visual Studio.NET you then select Properties... and click on the Message button in the Properties dialog. (In Version 6.0, you right click the class and select Add Windows Message Handler....)
In any case, the default message handler you’ll get for WM_MOUSEMOVE will look like this.
void CPopView::OnMouseMove(UINT ...
Read now
Unlock full access