Add the WM_LBUTTONUP and WM_LBUTTONDOWN cases to process
mouse-button input messages. Add the following statements to the window
function:
case WM_LBUTTONDOWN:
wsprintf(ButtonText, “WM_LBUTTONDOWN: %x, %d, %d”,
wParam, LOWORD(lParam), HIWORD(lParam));
InvalidateRect(hWnd, &rectButton, TRUE);
break;
case WM_LBUTTONUP:
wsprintf(ButtonText, “WM_LBUTTONUP: %x, %d, %d”,
wParam, LOWORD(lParam), HIWORD(lParam));
InvalidateRect(hWnd, &rectButton, TRUE);
break;