[MSPAINT] Reset scroll position in some situations (#5789)

In some situations, the scroll position should be reset.
- Add CCanvasWindow::resetScrollPos method.
- Reset the scroll position on loading a file.
- Reset the scroll position on mirroring/rotating
  the image.
CORE-19094
This commit is contained in:
Katayama Hirofumi MZ 2023-10-12 22:59:17 +09:00 committed by GitHub
parent 9a51c8e6c6
commit 1183e797b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 0 deletions

View file

@ -199,6 +199,12 @@ VOID CCanvasWindow::updateScrollInfo()
SetScrollInfo(SB_VERT, &si);
}
VOID CCanvasWindow::resetScrollPos()
{
SetScrollPos(SB_HORZ, 0);
SetScrollPos(SB_VERT, 0);
}
LRESULT CCanvasWindow::OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if (m_hWnd)