ReactOS
0.4.15-dev-5672-gf73ac17
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
16
LRESULT
CMiniatureWindow::OnClose
(
UINT
nMsg,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
& bHandled)
17
{
18
miniature
.ShowWindow(
SW_HIDE
);
19
showMiniature
=
FALSE
;
20
return
0;
21
}
22
23
LRESULT
CMiniatureWindow::OnPaint
(
UINT
nMsg,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
& bHandled)
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
35
LRESULT
CMiniatureWindow::OnSetCursor
(
UINT
nMsg,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
& bHandled)
36
{
37
SetCursor
(
LoadCursor
(
NULL
,
IDC_ARROW
));
38
bHandled =
FALSE
;
39
return
0;
40
}
CMiniatureWindow::OnSetCursor
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition:
miniature.cpp:35
CMiniatureWindow::OnClose
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition:
miniature.cpp:16
CMiniatureWindow::OnPaint
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition:
miniature.cpp:23
ImageModel::GetWidth
int GetWidth() const
Definition:
history.cpp:215
ImageModel::GetHeight
int GetHeight() const
Definition:
history.cpp:220
ImageModel::GetDC
HDC GetDC()
Definition:
history.cpp:239
wParam
WPARAM wParam
Definition:
combotst.c:138
lParam
LPARAM lParam
Definition:
combotst.c:139
NULL
#define NULL
Definition:
types.h:112
FALSE
#define FALSE
Definition:
types.h:117
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
miniature
CMiniatureWindow miniature
Definition:
main.cpp:65
imageModel
ImageModel imageModel
Definition:
main.cpp:32
showMiniature
BOOL showMiniature
Definition:
main.cpp:61
hdc
HDC hdc
Definition:
main.c:9
HDC
static HDC
Definition:
imagelist.c:92
UINT
unsigned int UINT
Definition:
ndis.h:50
DefWindowProc
#define DefWindowProc
Definition:
ros2win.h:31
tagRECT
Definition:
windef.h:305
tagRECT::right
LONG right
Definition:
windef.h:308
tagRECT::bottom
LONG bottom
Definition:
windef.h:309
precomp.h
LPARAM
LONG_PTR LPARAM
Definition:
windef.h:208
LRESULT
LONG_PTR LRESULT
Definition:
windef.h:209
WPARAM
UINT_PTR WPARAM
Definition:
windef.h:207
StretchBlt
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)
SRCCOPY
#define SRCCOPY
Definition:
wingdi.h:333
WM_PAINT
#define WM_PAINT
Definition:
winuser.h:1610
SW_HIDE
#define SW_HIDE
Definition:
winuser.h:762
IDC_ARROW
#define IDC_ARROW
Definition:
winuser.h:682
SetCursor
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
LoadCursor
#define LoadCursor
Definition:
winuser.h:5802
base
applications
mspaint
miniature.cpp
Generated on Wed Feb 8 2023 06:01:41 for ReactOS by
1.9.6