ReactOS  0.4.12-dev-57-g7050ac4
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 }
#define HDC
Definition: msvc.h:22
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define TRUE
Definition: types.h:120
#define SW_HIDE
Definition: winuser.h:762
LONG top
Definition: windef.h:297
LONG left
Definition: windef.h:296
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
LRESULT OnGetText(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:57
LONG right
Definition: windef.h:298
static VOID NTAPI BitBlt(IN ULONG Left, IN ULONG Top, IN ULONG Width, IN ULONG Height, IN PUCHAR Buffer, IN ULONG BitsPerPixel, IN ULONG Delta)
Definition: vga.c:416
int32_t INT
Definition: typedefs.h:56
WPARAM wParam
Definition: combotst.c:138
LRESULT OnCloseOrKeyDownOrLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:22
UINT_PTR WPARAM
Definition: windef.h:207
#define ICON_SMALL
Definition: tnclass.cpp:48
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:44
LONG_PTR LPARAM
Definition: windef.h:208
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
HDC GetDC()
Definition: history.cpp:219
smooth NULL
Definition: ftsmooth.c:416
#define SW_SHOW
Definition: winuser.h:769
unsigned int BOOL
Definition: ntddk_ex.h:94
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:29
unsigned int UINT
Definition: ndis.h:50
int GetWidth()
Definition: history.cpp:195
int GetHeight()
Definition: history.cpp:200
LRESULT OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:50
ImageModel imageModel
Definition: main.cpp:32
HINSTANCE hProgInstance
Definition: main.cpp:50
#define IDI_APPICON
Definition: resource.h:166
#define LoadCursor
Definition: winuser.h:5678
static HDC hDC
Definition: 3dtext.c:33
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:15
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1256
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define IDC_ARROW
Definition: winuser.h:682
#define SendMessage
Definition: winuser.h:5709
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1039
LONG bottom
Definition: windef.h:299
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define LoadIcon
Definition: winuser.h:5679
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
#define SRCCOPY
Definition: wingdi.h:331
#define ICON_BIG
Definition: tnclass.cpp:51
CMainWindow mainWindow
Definition: main.cpp:62