[MSPAINT] Improve CMiniatureWindow::OnPaint

CORE-18867
This commit is contained in:
Katayama Hirofumi MZ 2023-03-22 08:10:26 +09:00
parent 08248e83a0
commit 68e6820ddf

View file

@ -22,12 +22,14 @@ LRESULT CMiniatureWindow::OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL&
LRESULT CMiniatureWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
DefWindowProc(WM_PAINT, wParam, lParam);
RECT mclient;
HDC hdc;
miniature.GetClientRect(&mclient);
hdc = miniature.GetDC();
StretchBlt(hdc, 0, 0, mclient.right, mclient.bottom, imageModel.GetDC(), 0, 0, imageModel.GetWidth(), imageModel.GetHeight(), SRCCOPY);
miniature.ReleaseDC(hdc);
RECT rc;
GetClientRect(&rc);
PAINTSTRUCT ps;
HDC hDC = BeginPaint(&ps);
StretchBlt(hDC, 0, 0, rc.right, rc.bottom,
imageModel.GetDC(), 0, 0, imageModel.GetWidth(), imageModel.GetHeight(),
SRCCOPY);
EndPaint(&ps);
return 0;
}