xref: /reactos/base/applications/mspaint/dialogs.h (revision 845faec4)
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 
16     BEGIN_MSG_MAP(CMirrorRotateDialog)
17         MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
18         MESSAGE_HANDLER(WM_CLOSE, OnClose)
19         COMMAND_ID_HANDLER(IDOK, OnOk)
20         COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
21         COMMAND_ID_HANDLER(IDD_MIRRORROTATERB3, OnRadioButton3)
22         COMMAND_ID_HANDLER(IDD_MIRRORROTATERB1, OnRadioButton12)
23         COMMAND_ID_HANDLER(IDD_MIRRORROTATERB2, OnRadioButton12)
24     END_MSG_MAP()
25 
26     LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
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 
34 class CAttributesDialog : public CDialogImpl<CAttributesDialog>
35 {
36 public:
37     enum { IDD = IDD_ATTRIBUTES };
38 
39     BEGIN_MSG_MAP(CAttributesDialog)
40         MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
41         MESSAGE_HANDLER(WM_CLOSE, OnClose)
42         COMMAND_ID_HANDLER(IDOK, OnOk)
43         COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
44         COMMAND_ID_HANDLER(IDD_ATTRIBUTESSTANDARD, OnDefault)
45         COMMAND_ID_HANDLER(IDD_ATTRIBUTESRB1, OnRadioButton1)
46         COMMAND_ID_HANDLER(IDD_ATTRIBUTESRB1, OnRadioButton2)
47         COMMAND_ID_HANDLER(IDD_ATTRIBUTESRB1, OnRadioButton3)
48         COMMAND_ID_HANDLER(IDD_ATTRIBUTESEDIT1, OnEdit1)
49         COMMAND_ID_HANDLER(IDD_ATTRIBUTESEDIT1, OnEdit2)
50     END_MSG_MAP()
51 
52     LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
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 
68 class CStretchSkewDialog : public CDialogImpl<CStretchSkewDialog>
69 {
70 public:
71     enum { IDD = IDD_STRETCHSKEW };
72 
73     BEGIN_MSG_MAP(CStretchSkewDialog)
74         MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
75         MESSAGE_HANDLER(WM_CLOSE, OnClose)
76         COMMAND_ID_HANDLER(IDOK, OnOk)
77         COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
78     END_MSG_MAP()
79 
80     LRESULT OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
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;
87     POINT angle;
88 };
89