mirror of
https://github.com/reactos/reactos.git
synced 2025-05-08 19:27:00 +00:00
[MSPAINT] Improve CMiniatureWindow::OnPaint
CORE-18867
This commit is contained in:
parent
08248e83a0
commit
68e6820ddf
1 changed files with 9 additions and 7 deletions
|
@ -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)
|
LRESULT CMiniatureWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||||
{
|
{
|
||||||
DefWindowProc(WM_PAINT, wParam, lParam);
|
RECT rc;
|
||||||
RECT mclient;
|
GetClientRect(&rc);
|
||||||
HDC hdc;
|
|
||||||
miniature.GetClientRect(&mclient);
|
PAINTSTRUCT ps;
|
||||||
hdc = miniature.GetDC();
|
HDC hDC = BeginPaint(&ps);
|
||||||
StretchBlt(hdc, 0, 0, mclient.right, mclient.bottom, imageModel.GetDC(), 0, 0, imageModel.GetWidth(), imageModel.GetHeight(), SRCCOPY);
|
StretchBlt(hDC, 0, 0, rc.right, rc.bottom,
|
||||||
miniature.ReleaseDC(hdc);
|
imageModel.GetDC(), 0, 0, imageModel.GetWidth(), imageModel.GetHeight(),
|
||||||
|
SRCCOPY);
|
||||||
|
EndPaint(&ps);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue