Full Screen handwriting
For example, open a PDF file. We know the total height of the PDF (total page number * single page height ). Get the position of the upper-left corner of the current window relative to the PDF of the total page from getscrollpos (sb_vert.
You also need to record the X and Y coordinates of the current mouse onmousemove. Take Y coordinates as an example: Y = point. Y + getscrollpos (sb_vert); where point is the parameter of onmousemove.
When saving the Y value, we need to save the height relative to the PDF, and getscrollpos (sb_vert). The reason is that you can calculate the height change relative to the view.
The result is relative to the position of the PDF.
Note: You need to know more about PDF and view than the screen. The key is this problem.
In onpaint, what we need to deal with is to subtract the value of Y from getscrollpos (sb_vert) to get the height relative to the view, so that we can correctly implement the view.