2015-07-07 11:02:30 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: PAINT for ReactOS
|
|
|
|
* LICENSE: LGPL
|
2015-09-09 13:13:35 +00:00
|
|
|
* FILE: base/applications/mspaint/miniature.cpp
|
2015-07-07 11:02:30 +00:00
|
|
|
* PURPOSE: Window procedure of the main window and all children apart from
|
|
|
|
* hPalWin, hToolSettings and hSelection
|
|
|
|
* PROGRAMMERS: Benedikt Freisen
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES *********************************************************/
|
|
|
|
|
|
|
|
#include "precomp.h"
|
|
|
|
|
|
|
|
/* FUNCTIONS ********************************************************/
|
|
|
|
|
|
|
|
LRESULT CMiniatureWindow::OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
|
|
|
{
|
|
|
|
miniature.ShowWindow(SW_HIDE);
|
|
|
|
showMiniature = FALSE;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
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();
|
2015-07-23 13:52:02 +00:00
|
|
|
StretchBlt(hdc, 0, 0, mclient.right, mclient.bottom, imageModel.GetDC(), 0, 0, imageModel.GetWidth(), imageModel.GetHeight(), SRCCOPY);
|
2015-07-07 11:02:30 +00:00
|
|
|
miniature.ReleaseDC(hdc);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
LRESULT CMiniatureWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
|
|
|
{
|
|
|
|
SetCursor(LoadCursor(NULL, IDC_ARROW));
|
2015-08-15 10:13:28 +00:00
|
|
|
bHandled = FALSE;
|
2015-07-07 11:02:30 +00:00
|
|
|
return 0;
|
|
|
|
}
|