4.2.10 Adding a WM_MOUSEMOVE Case

To make your application process mouse-motion messages, add a WM_MOUSEMOVE case to the window procedure, as follows:

case WM_MOUSEMOVE:
    wsprintf(MouseText, "WM_MOUSEMOVE: %x, %d, %d",
        wParam, LOWORD(lParam), HIWORD(lParam));
    InvalidateRect(hWnd, &rectMouse, TRUE);
    break;