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 /* FUNCTIONS ********************************************************/
16 MRDlgWinProc(HWND hwnd
, UINT message
, WPARAM wParam
, LPARAM lParam
)
21 CheckDlgButton(hwnd
, IDD_MIRRORROTATERB1
, BST_CHECKED
);
22 CheckDlgButton(hwnd
, IDD_MIRRORROTATERB4
, BST_CHECKED
);
28 switch (LOWORD(wParam
))
31 if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB1
))
33 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB2
))
35 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB4
))
37 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB5
))
39 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB6
))
45 case IDD_MIRRORROTATERB3
:
46 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB4
), TRUE
);
47 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB5
), TRUE
);
48 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB6
), TRUE
);
50 case IDD_MIRRORROTATERB1
:
51 case IDD_MIRRORROTATERB2
:
52 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB4
), FALSE
);
53 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB5
), FALSE
);
54 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB6
), FALSE
);
67 return DialogBox(hProgInstance
, MAKEINTRESOURCE(IDD_MIRRORROTATE
), hMainWnd
, (DLGPROC
) MRDlgWinProc
);
71 ATTDlgWinProc(HWND hwnd
, UINT message
, WPARAM wParam
, LPARAM lParam
)
80 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB3
, BST_CHECKED
);
81 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB5
, BST_CHECKED
);
82 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT1
, imgXRes
, FALSE
);
83 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT2
, imgYRes
, FALSE
);
90 GetDateFormat(LOCALE_USER_DEFAULT
, 0, &fileTime
, NULL
, date
, SIZEOF(date
));
91 GetTimeFormat(LOCALE_USER_DEFAULT
, 0, &fileTime
, NULL
, temp
, SIZEOF(temp
));
92 _tcscat(date
, _T(" "));
94 LoadString(hProgInstance
, IDS_FILESIZE
, strrc
, SIZEOF(strrc
));
95 _stprintf(size
, strrc
, fileSize
);
96 SetDlgItemText(hwnd
, IDD_ATTRIBUTESTEXT6
, date
);
97 SetDlgItemText(hwnd
, IDD_ATTRIBUTESTEXT7
, size
);
99 LoadString(hProgInstance
, IDS_PRINTRES
, strrc
, SIZEOF(strrc
));
100 _stprintf(res
, strrc
, fileHPPM
, fileVPPM
);
101 SetDlgItemText(hwnd
, IDD_ATTRIBUTESTEXT8
, res
);
108 switch (LOWORD(wParam
))
112 GetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT1
, NULL
,
113 FALSE
) | (GetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT2
, NULL
,
119 case IDD_ATTRIBUTESSTANDARD
:
120 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB3
, BST_CHECKED
);
121 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB5
, BST_CHECKED
);
122 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT1
, imgXRes
, FALSE
);
123 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT2
, imgYRes
, FALSE
);
136 return DialogBox(hProgInstance
, MAKEINTRESOURCE(IDD_ATTRIBUTES
), hMainWnd
, (DLGPROC
) ATTDlgWinProc
);
140 CHSIZEDlgWinProc(HWND hwnd
, UINT message
, WPARAM wParam
, LPARAM lParam
)
145 SetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT1
, 100, FALSE
);
146 SetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT2
, 100, FALSE
);
152 switch (LOWORD(wParam
))
156 GetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT1
, NULL
,
157 FALSE
) | (GetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT2
, NULL
,
174 return DialogBox(hProgInstance
, MAKEINTRESOURCE(IDD_CHANGESIZE
), hMainWnd
, (DLGPROC
) CHSIZEDlgWinProc
);