ReactOS 0.4.15-dev-5667-ged97270
fullscreen.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL
4 * FILE: base/applications/mspaint/fullscreen.cpp
5 * PURPOSE: Window for fullscreen view
6 * PROGRAMMERS: Benedikt Freisen
7 */
8
9/* INCLUDES *********************************************************/
10
11#include "precomp.h"
12
13/* FUNCTIONS ********************************************************/
14
16{
19 return 0;
20}
21
23{
26 return 0;
27}
28
30{
31 PAINTSTRUCT ps;
32 HDC hDC = BeginPaint(&ps);
33 RECT rcWnd;
34 GetWindowRect(&rcWnd);
35 INT cxDest = imageModel.GetWidth();
36 INT cyDest = imageModel.GetHeight();
37 INT xDest = (rcWnd.right - rcWnd.left - cxDest) / 2;
38 INT yDest = (rcWnd.bottom - rcWnd.top - cyDest) / 2;
39 BitBlt(hDC, xDest, yDest, cxDest, cyDest, imageModel.GetDC(), 0, 0, SRCCOPY);
40 EndPaint(&ps);
41 return 0;
42}
43
45{
46 Invalidate(TRUE);
47 return 0;
48}
49
51{
53 bHandled = FALSE;
54 return 0;
55}
56
58{
59 // return caption of the main window, instead
60 return mainWindow.SendMessage(nMsg, wParam, lParam);
61}
static HDC hDC
Definition: 3dtext.c:33
#define IDI_APPICON
Definition: resource.h:166
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1110
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1327
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:29
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:15
LRESULT OnGetText(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:57
LRESULT OnCloseOrKeyDownOrLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:22
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:50
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:44
int GetWidth() const
Definition: history.cpp:215
int GetHeight() const
Definition: history.cpp:220
HDC GetDC()
Definition: history.cpp:239
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static VOID NTAPI BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
Definition: common.c:49
unsigned int BOOL
Definition: ntddk_ex.h:94
ImageModel imageModel
Definition: main.cpp:32
HINSTANCE hProgInstance
Definition: main.cpp:50
CMainWindow mainWindow
Definition: main.cpp:63
static HDC
Definition: imagelist.c:92
unsigned int UINT
Definition: ndis.h:50
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define ICON_BIG
Definition: tnclass.cpp:51
#define ICON_SMALL
Definition: tnclass.cpp:48
int32_t INT
Definition: typedefs.h:58
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define SRCCOPY
Definition: wingdi.h:333
#define SW_HIDE
Definition: winuser.h:762
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define IDC_ARROW
Definition: winuser.h:682
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define LoadIcon
Definition: winuser.h:5803
#define SendMessage
Definition: winuser.h:5833
#define LoadCursor
Definition: winuser.h:5802
#define SW_SHOW
Definition: winuser.h:769
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define MAKEINTRESOURCE
Definition: winuser.h:591