About WPARAM:
When the cursor of the mouse is placed on the rolling square and hold the ram button, you can move the rollup. This creates a rolling column message with SB_THUMBTRACK and SB_THUMBPSITION notification code. When WPARAM's low character is sb_thumbtrack, the high character group of WPARAM is the current location when the user is dragging the scroll. This location is located between the minimum and the maximum value of the roll column range. When WPARAM's low character is sb_thumbposition, the high character group of WPARAM is the final position of the user after the use of the roller key. For other rolling columns, WPARAM's high character should be ignored.
The WPARAM message parameter is divided into a low character group and a high character group. WPARAM's low character group is a value that indicates the operation of the roll-up column. This value is seen as a "notification code". The value of the notification code is defined by the identification word starting at SB (represents "Scroll Bar").
About LPARAM:
The low word of the LPARAM parameter transmitted to the window message processing contains the width of the display area, and the height of the display area is included in the high character. To save these sizes, you need to define two static variables in the window message processing:
Static int CxClient, Cyclient;