2 * PROJECT: PAINT for ReactOS
4 * FILE: base/applications/paint/dialogs.c
5 * PURPOSE: Window procedures of the dialog windows plus launching functions
6 * PROGRAMMERS: Benedikt Freisen
9 /* INCLUDES *********************************************************/
13 #include "definitions.h"
14 #include "globalvar.h"
16 /* FUNCTIONS ********************************************************/
19 MRDlgWinProc(HWND hwnd
, UINT message
, WPARAM wParam
, LPARAM lParam
)
24 CheckDlgButton(hwnd
, IDD_MIRRORROTATERB1
, BST_CHECKED
);
25 CheckDlgButton(hwnd
, IDD_MIRRORROTATERB4
, BST_CHECKED
);
31 switch (LOWORD(wParam
))
34 if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB1
))
36 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB2
))
38 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB4
))
40 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB5
))
42 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB6
))
48 case IDD_MIRRORROTATERB3
:
49 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB4
), TRUE
);
50 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB5
), TRUE
);
51 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB6
), TRUE
);
53 case IDD_MIRRORROTATERB1
:
54 case IDD_MIRRORROTATERB2
:
55 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB4
), FALSE
);
56 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB5
), FALSE
);
57 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB6
), FALSE
);
70 return DialogBox(hProgInstance
, MAKEINTRESOURCE(IDD_MIRRORROTATE
), hMainWnd
, (DLGPROC
) MRDlgWinProc
);
74 ATTDlgWinProc(HWND hwnd
, UINT message
, WPARAM wParam
, LPARAM lParam
)
83 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB3
, BST_CHECKED
);
84 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB5
, BST_CHECKED
);
85 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT1
, imgXRes
, FALSE
);
86 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT2
, imgYRes
, FALSE
);
93 GetDateFormat(LOCALE_USER_DEFAULT
, 0, &fileTime
, NULL
, date
, SIZEOF(date
));
94 GetTimeFormat(LOCALE_USER_DEFAULT
, 0, &fileTime
, NULL
, temp
, SIZEOF(temp
));
95 _tcscat(date
, _T(" "));
97 LoadString(hProgInstance
, IDS_FILESIZE
, strrc
, SIZEOF(strrc
));
98 _stprintf(size
, strrc
, fileSize
);
99 SetDlgItemText(hwnd
, IDD_ATTRIBUTESTEXT6
, date
);
100 SetDlgItemText(hwnd
, IDD_ATTRIBUTESTEXT7
, size
);
102 LoadString(hProgInstance
, IDS_PRINTRES
, strrc
, SIZEOF(strrc
));
103 _stprintf(res
, strrc
, fileHPPM
, fileVPPM
);
104 SetDlgItemText(hwnd
, IDD_ATTRIBUTESTEXT8
, res
);
111 switch (LOWORD(wParam
))
115 GetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT1
, NULL
,
116 FALSE
) | (GetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT2
, NULL
,
122 case IDD_ATTRIBUTESSTANDARD
:
123 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB3
, BST_CHECKED
);
124 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB5
, BST_CHECKED
);
125 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT1
, imgXRes
, FALSE
);
126 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT2
, imgYRes
, FALSE
);
139 return DialogBox(hProgInstance
, MAKEINTRESOURCE(IDD_ATTRIBUTES
), hMainWnd
, (DLGPROC
) ATTDlgWinProc
);
143 CHSIZEDlgWinProc(HWND hwnd
, UINT message
, WPARAM wParam
, LPARAM lParam
)
148 SetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT1
, 100, FALSE
);
149 SetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT2
, 100, FALSE
);
155 switch (LOWORD(wParam
))
159 GetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT1
, NULL
,
160 FALSE
) | (GetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT2
, NULL
,
177 return DialogBox(hProgInstance
, MAKEINTRESOURCE(IDD_CHANGESIZE
), hMainWnd
, (DLGPROC
) CHSIZEDlgWinProc
);