ReactOS 0.4.15-dev-5666-gc548b97
CFullscreenWindow Class Reference

#include <fullscreen.h>

Inheritance diagram for CFullscreenWindow:
Collaboration diagram for CFullscreenWindow:

Public Member Functions

LRESULT OnCreate (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnCloseOrKeyDownOrLButtonDown (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnPaint (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSetCursor (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnGetText (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 

Detailed Description

Definition at line 11 of file fullscreen.h.

Member Function Documentation

◆ OnCloseOrKeyDownOrLButtonDown()

LRESULT CFullscreenWindow::OnCloseOrKeyDownOrLButtonDown ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 22 of file fullscreen.cpp.

23{
26 return 0;
27}
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1327
CMainWindow mainWindow
Definition: main.cpp:63
#define SW_HIDE
Definition: winuser.h:762
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOW
Definition: winuser.h:769

◆ OnCreate()

LRESULT CFullscreenWindow::OnCreate ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 15 of file fullscreen.cpp.

16{
19 return 0;
20}
#define IDI_APPICON
Definition: resource.h:166
HINSTANCE hProgInstance
Definition: main.cpp:50
#define ICON_BIG
Definition: tnclass.cpp:51
#define ICON_SMALL
Definition: tnclass.cpp:48
LONG_PTR LPARAM
Definition: windef.h:208
#define LoadIcon
Definition: winuser.h:5803
#define SendMessage
Definition: winuser.h:5833
#define MAKEINTRESOURCE
Definition: winuser.h:591

◆ OnGetText()

LRESULT CFullscreenWindow::OnGetText ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 57 of file fullscreen.cpp.

58{
59 // return caption of the main window, instead
60 return mainWindow.SendMessage(nMsg, wParam, lParam);
61}
LRESULT SendMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: atlwin.h:1110
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139

◆ OnPaint()

LRESULT CFullscreenWindow::OnPaint ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 29 of file fullscreen.cpp.

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}
static HDC hDC
Definition: 3dtext.c:33
int GetWidth() const
Definition: history.cpp:215
int GetHeight() const
Definition: history.cpp:220
HDC GetDC()
Definition: history.cpp:239
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
ImageModel imageModel
Definition: main.cpp:32
static HDC
Definition: imagelist.c:92
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
int32_t INT
Definition: typedefs.h:58
#define SRCCOPY
Definition: wingdi.h:333
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)

◆ OnSetCursor()

LRESULT CFullscreenWindow::OnSetCursor ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 50 of file fullscreen.cpp.

51{
53 bHandled = FALSE;
54 return 0;
55}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define IDC_ARROW
Definition: winuser.h:682
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define LoadCursor
Definition: winuser.h:5802

◆ OnSize()

LRESULT CFullscreenWindow::OnSize ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 44 of file fullscreen.cpp.

45{
46 Invalidate(TRUE);
47 return 0;
48}
#define TRUE
Definition: types.h:120

The documentation for this class was generated from the following files: