ReactOS 0.4.15-dev-7934-g1dc8d80
main.h
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: The main window
5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6 * Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
7 */
8
9#pragma once
10
11class CMainWindow : public CWindowImpl<CMainWindow>
12{
13public:
15
29
31
32 HWND DoCreate();
33 BOOL GetOpenFileName(IN OUT LPWSTR pszFile, INT cchMaxFile);
34 BOOL GetSaveFileName(IN OUT LPWSTR pszFile, INT cchMaxFile);
35 BOOL ChooseColor(IN OUT COLORREF *prgbColor);
36 VOID TrackPopupMenu(POINT ptScreen, INT iSubMenu);
37 BOOL CanUndo() const;
38 BOOL CanRedo() const;
39 BOOL CanPaste() const;
40
41private:
43
47 LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
49 LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
55
57 void saveImage(BOOL overwrite);
60 void ProcessFileMenu(HMENU hPopupMenu);
61};
LRESULT OnSysColorChange(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:811
void InsertSelectionFromHBITMAP(HBITMAP bitmap, HWND window)
Definition: main.cpp:431
void alignChildrenToMainWindow()
Definition: main.cpp:341
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:786
VOID TrackPopupMenu(POINT ptScreen, INT iSubMenu)
Definition: main.cpp:1316
HMENU m_hMenu
Definition: main.h:42
LRESULT OnDropFiles(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:531
void ProcessFileMenu(HMENU hPopupMenu)
Definition: main.cpp:643
BOOL CanUndo() const
Definition: main.cpp:676
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:767
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:634
BOOL ConfirmSave()
Definition: main.cpp:607
LRESULT OnInitMenuPopup(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:702
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:819
LRESULT OnGetMinMaxInfo(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:779
LRESULT OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:481
void saveImage(BOOL overwrite)
Definition: main.cpp:407
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:544
BOOL CanRedo() const
Definition: main.cpp:685
BOOL CanPaste() const
Definition: main.cpp:692
LRESULT OnDestroy(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: main.cpp:582
HWND DoCreate()
Definition: main.cpp:309
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define GetSaveFileName
Definition: commdlg.h:666
#define ChooseColor
Definition: commdlg.h:661
#define GetOpenFileName
Definition: commdlg.h:665
#define NULL
Definition: types.h:112
unsigned int BOOL
Definition: ntddk_ex.h:94
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1926
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1898
#define END_MSG_MAP()
Definition: atlwin.h:1917
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
Definition: atlwin.h:2004
static HBITMAP
Definition: button.c:44
static IHTMLWindow2 * window
Definition: events.c:77
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
Definition: uimain.c:89
#define WM_MOUSEWHEEL
Definition: treelist.c:96
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
DWORD COLORREF
Definition: windef.h:300
#define WM_CLOSE
Definition: winuser.h:1621
#define WM_CREATE
Definition: winuser.h:1608
#define WM_SIZE
Definition: winuser.h:1611
#define WM_DROPFILES
Definition: winuser.h:1825
#define WM_COMMAND
Definition: winuser.h:1740
#define CS_DBLCLKS
Definition: winuser.h:651
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1626
#define WM_GETMINMAXINFO
Definition: winuser.h:1640
#define WM_INITMENUPOPUP
Definition: winuser.h:1746
#define WM_DESTROY
Definition: winuser.h:1609
#define WM_KEYDOWN
Definition: winuser.h:1715
#define COLOR_BTNFACE
Definition: winuser.h:928
WCHAR * LPWSTR
Definition: xmlstorage.h:184