ReactOS  0.4.15-dev-4872-g8a3db97
dialogs.h
Go to the documentation of this file.
1 /*
2  * PROJECT: PAINT for ReactOS
3  * LICENSE: LGPL
4  * FILE: base/applications/mspaint/dialogs.h
5  * PURPOSE: Window procedures of the dialog windows plus launching functions
6  * PROGRAMMERS: Benedikt Freisen
7  */
8 
9 #pragma once
10 
11 class CMirrorRotateDialog : public CDialogImpl<CMirrorRotateDialog>
12 {
13 public:
14  enum { IDD = IDD_MIRRORROTATE };
15 
24  END_MSG_MAP()
25 
27  LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
28  LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
29  LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
30  LRESULT OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
31  LRESULT OnRadioButton12(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
32 };
33 
35 {
36 public:
37  enum { IDD = IDD_ATTRIBUTES };
38 
45  COMMAND_ID_HANDLER(IDD_ATTRIBUTESRB1, OnRadioButton1)
46  COMMAND_ID_HANDLER(IDD_ATTRIBUTESRB2, OnRadioButton2)
50  END_MSG_MAP()
51 
53  LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
54  LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
55  LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
56  LRESULT OnDefault(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
57  LRESULT OnRadioButton1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
58  LRESULT OnRadioButton2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
59  LRESULT OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
60  LRESULT OnEdit1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
61  LRESULT OnEdit2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
62 
63 public:
64  int newWidth;
65  int newHeight;
66 };
67 
69 {
70 public:
71  enum { IDD = IDD_STRETCHSKEW };
72 
78  END_MSG_MAP()
79 
81  LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
82  LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
83  LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
84 
85 public:
86  POINT percentage;
88 };
89 
90 class CFontsDialog : public CDialogImpl<CFontsDialog>
91 {
92 public:
93  enum { IDD = IDD_FONTS };
94 
95  CFontsDialog();
96  void InitFontNames();
97  void InitFontSizes();
98  void InitToolbar();
99 
106  MESSAGE_HANDLER(WM_TOOLSMODELTOOLCHANGED, OnToolsModelToolChanged)
109  END_MSG_MAP()
110 
111 protected:
112  LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
113  LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
114  LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
115  LRESULT OnMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
116  LRESULT OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
117  LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
119  LRESULT OnDrawItem(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
120  void OnFontSize(UINT codeNotify);
121  void OnFontName(UINT codeNotify);
122 };
#define IDOK
Definition: winuser.h:824
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:33
#define IDD_ATTRIBUTES
Definition: resource.h:134
void OnMove(WPARAM nType, int cx, int cy)
Definition: taskmgr.c:785
LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: dialogs.cpp:26
static LRESULT OnNotify(HWND hWnd, LPARAM lParam)
Definition: wordpad.c:2004
#define IDD_FONTS
Definition: resource.h:174
#define WM_MOVE
Definition: winuser.h:1597
static int OnCommand(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: clipbrd.c:202
UINT_PTR WPARAM
Definition: windef.h:207
GLfloat angle
Definition: glext.h:10853
#define IDD_MIRRORROTATERB3
Definition: resource.h:129
#define IDD_STRETCHSKEW
Definition: resource.h:154
WPARAM wParam
Definition: combotst.c:138
unsigned int BOOL
Definition: ntddk_ex.h:94
#define IDD_ATTRIBUTESSTANDARD
Definition: resource.h:145
LONG_PTR LPARAM
Definition: windef.h:208
#define COMMAND_ID_HANDLER(id, func)
Definition: atlwin.h:1919
static LRESULT OnDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam)
Definition: welcome.c:1411
#define IDD_ATTRIBUTESEDIT1
Definition: resource.h:135
#define IDD_ATTRIBUTESRB3
Definition: resource.h:150
#define END_MSG_MAP()
Definition: atlwin.h:1883
#define WM_CLOSE
Definition: winuser.h:1608
LRESULT OnRadioButton3(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:60
unsigned short WORD
Definition: ntddk_ex.h:93
#define WM_MEASUREITEM
Definition: winuser.h:1633
#define IDD_MIRRORROTATERB1
Definition: resource.h:127
static BOOL protected
Definition: protectdata.c:37
#define IDD_ATTRIBUTESEDIT2
Definition: resource.h:136
#define WM_COMMAND
Definition: winuser.h:1727
#define IDD_ATTRIBUTESRB1
Definition: resource.h:148
void OnMeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct)
Definition: page1.c:138
#define IDD_MIRRORROTATE
Definition: resource.h:125
unsigned int UINT
Definition: ndis.h:50
#define WM_TOOLSMODELTOOLCHANGED
Definition: precomp.h:36
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1864
#define IDD_MIRRORROTATERB2
Definition: resource.h:128
#define WM_DRAWITEM
Definition: winuser.h:1632
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1892
const WCHAR * class
Definition: main.c:68
LRESULT OnOk(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:39
#define IDCANCEL
Definition: winuser.h:825
LONG_PTR LRESULT
Definition: windef.h:209
LRESULT OnRadioButton12(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:68
#define WM_INITDIALOG
Definition: winuser.h:1726
LPARAM lParam
Definition: combotst.c:139
#define IDD_ATTRIBUTESRB2
Definition: resource.h:149
#define WM_NOTIFY
Definition: richedit.h:61
LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
Definition: dialogs.cpp:54