There is a small problem with the accel program in Chapter 2, that is, when you move the scroll bar to a position, the size of the modified window will not save the current position, but return to the upper left corner of the window. This is not in line with our habits. The content in the upper left corner of the window remains unchanged no matter how the window changes. After carefully reading the accel program, you can modify it to implement this function.
The original program
Void cmainwindow: onsize (uint ntype, int CX, int CY) function returns the position of the flow entry to zero, which is the problem. This function does not change the position of the scroll bar to achieve the effect in this article. However, the original program only initializes "m_nhscrollpos" and "m_nvscrollpos" in this function, so we need to put the initialization work in the int cmainwindow: oncreate (lpcreatestruct) function.
Run the command after modification !!