ReactOS 0.4.15-dev-7654-g6bc40d3
fullscreen.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Window for fullscreen view
5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6 */
7
8#include "precomp.h"
9
11
12/* FUNCTIONS ********************************************************/
13
14HWND CFullscreenWindow::DoCreate()
15{
16 if (m_hWnd)
17 return m_hWnd;
18
19 RECT rc = {0, 0, 0, 0}; // Rely on SW_SHOWMAXIMIZED
21}
22
24{
27 return 0;
28}
29
31{
34 return 0;
35}
36
38{
39 PAINTSTRUCT ps;
40 HDC hDC = BeginPaint(&ps);
41 RECT rcWnd;
42 GetWindowRect(&rcWnd);
43 INT cxDest = imageModel.GetWidth();
44 INT cyDest = imageModel.GetHeight();
45 INT xDest = (rcWnd.right - rcWnd.left - cxDest) / 2;
46 INT yDest = (rcWnd.bottom - rcWnd.top - cyDest) / 2;
47 ::BitBlt(hDC, xDest, yDest, cxDest, cyDest, imageModel.GetDC(), 0, 0, SRCCOPY);
48 EndPaint(&ps);
49 return 0;
50}
51
53{
54 // return caption of the main window, instead
55 return mainWindow.SendMessage(nMsg, wParam, lParam);
56}
static HDC hDC
Definition: 3dtext.c:33
#define IDI_APPICON
Definition: resource.h:166
CMainWindow mainWindow
Definition: main.cpp:25
HINSTANCE g_hinstExe
Definition: main.cpp:17
@ Create
Definition: registry.c:563
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1116
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1333
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:37
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:23
LRESULT OnGetText(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:52
LRESULT OnCloseOrKeyDownOrLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: fullscreen.cpp:30
int GetWidth() const
Definition: history.cpp:253
int GetHeight() const
Definition: history.cpp:258
HDC GetDC()
Definition: history.cpp:271
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
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
CFullscreenWindow fullscreenWindow
Definition: fullscreen.cpp:10
ImageModel imageModel
Definition: history.cpp:11
static HDC
Definition: imagelist.c:92
unsigned int UINT
Definition: ndis.h:50
#define WS_EX_TOPMOST
Definition: pedump.c:647
#define WS_POPUPWINDOW
Definition: pedump.c:638
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:767
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define HWND_DESKTOP
Definition: winuser.h:1208
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define SendMessage
Definition: winuser.h:5842
#define SW_SHOW
Definition: winuser.h:774
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2058