ReactOS  0.4.12-dev-75-g00dd17e
miniature.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: PAINT for ReactOS
3  * LICENSE: LGPL
4  * FILE: base/applications/mspaint/miniature.cpp
5  * PURPOSE: Window procedure of the main window and all children apart from
6  * hPalWin, hToolSettings and hSelection
7  * PROGRAMMERS: Benedikt Freisen
8  */
9 
10 /* INCLUDES *********************************************************/
11 
12 #include "precomp.h"
13 
14 /* FUNCTIONS ********************************************************/
15 
17 {
18  miniature.ShowWindow(SW_HIDE);
20  return 0;
21 }
22 
24 {
25  DefWindowProc(WM_PAINT, wParam, lParam);
26  RECT mclient;
27  HDC hdc;
28  miniature.GetClientRect(&mclient);
29  hdc = miniature.GetDC();
30  StretchBlt(hdc, 0, 0, mclient.right, mclient.bottom, imageModel.GetDC(), 0, 0, imageModel.GetWidth(), imageModel.GetHeight(), SRCCOPY);
31  miniature.ReleaseDC(hdc);
32  return 0;
33 }
34 
36 {
38  bHandled = FALSE;
39  return 0;
40 }
#define HDC
Definition: msvc.h:22
#define SW_HIDE
Definition: winuser.h:762
LONG right
Definition: windef.h:298
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
WPARAM wParam
Definition: combotst.c:138
UINT_PTR WPARAM
Definition: windef.h:207
LONG_PTR LPARAM
Definition: windef.h:208
HDC GetDC()
Definition: history.cpp:219
HDC hdc
Definition: msvc.h:53
CMiniatureWindow miniature
Definition: main.cpp:64
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: miniature.cpp:16
smooth NULL
Definition: ftsmooth.c:416
#define DefWindowProc
Definition: ros2win.h:31
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: miniature.cpp:23
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned int UINT
Definition: ndis.h:50
BOOL showMiniature
Definition: main.cpp:60
#define WM_PAINT
Definition: winuser.h:1602
int GetWidth()
Definition: history.cpp:195
int GetHeight()
Definition: history.cpp:200
ImageModel imageModel
Definition: main.cpp:32
#define LoadCursor
Definition: winuser.h:5678
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define IDC_ARROW
Definition: winuser.h:682
LONG bottom
Definition: windef.h:299
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: miniature.cpp:35
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
#define SRCCOPY
Definition: wingdi.h:331