2df56f1545e85c868c9828a2a359495354d139e5
2 * PROJECT: PAINT for ReactOS
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 ********************************************************/
18 LRESULT CALLBACK
MRDlgWinProc (HWND hwnd
, UINT message
, WPARAM wParam
, LPARAM lParam
)
23 CheckDlgButton(hwnd
, IDD_MIRRORROTATERB1
, BST_CHECKED
);
24 CheckDlgButton(hwnd
, IDD_MIRRORROTATERB4
, BST_CHECKED
);
30 switch (LOWORD(wParam
))
33 if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB1
))
35 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB2
))
37 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB4
))
39 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB5
))
41 else if (IsDlgButtonChecked(hwnd
, IDD_MIRRORROTATERB6
))
47 case IDD_MIRRORROTATERB3
:
48 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB4
), TRUE
);
49 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB5
), TRUE
);
50 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB6
), TRUE
);
52 case IDD_MIRRORROTATERB1
:
53 case IDD_MIRRORROTATERB2
:
54 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB4
), FALSE
);
55 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB5
), FALSE
);
56 EnableWindow(GetDlgItem(hwnd
, IDD_MIRRORROTATERB6
), FALSE
);
68 return DialogBox(hProgInstance
, MAKEINTRESOURCE(IDD_MIRRORROTATE
), hMainWnd
, (DLGPROC
)MRDlgWinProc
);
71 LRESULT CALLBACK
ATTDlgWinProc (HWND hwnd
, UINT message
, WPARAM wParam
, LPARAM lParam
)
76 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB3
, BST_CHECKED
);
77 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB5
, BST_CHECKED
);
78 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT1
, imgXRes
, FALSE
);
79 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT2
, imgYRes
, FALSE
);
86 GetDateFormat(LOCALE_USER_DEFAULT
, 0, &fileTime
, NULL
, date
, sizeof(date
));
87 GetTimeFormat(LOCALE_USER_DEFAULT
, 0, &fileTime
, NULL
, temp
, sizeof(temp
));
88 _tcscat(date
, _T(" "));
90 LoadString(hProgInstance
, IDS_FILESIZE
, strrc
, sizeof(strrc
));
91 _stprintf(size
, strrc
, fileSize
);
92 SetDlgItemText(hwnd
, IDD_ATTRIBUTESTEXT6
, date
);
93 SetDlgItemText(hwnd
, IDD_ATTRIBUTESTEXT7
, size
);
96 LoadString(hProgInstance
, IDS_PRINTRES
, strrc
, sizeof(strrc
));
97 _stprintf(res
, strrc
, fileHPPM
, fileVPPM
);
98 SetDlgItemText(hwnd
, IDD_ATTRIBUTESTEXT8
, res
);
104 switch (LOWORD(wParam
))
107 EndDialog(hwnd
, GetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT1
, NULL
, FALSE
) | (GetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT2
, NULL
, FALSE
)<<16));
112 case IDD_ATTRIBUTESSTANDARD
:
113 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB3
, BST_CHECKED
);
114 CheckDlgButton(hwnd
, IDD_ATTRIBUTESRB5
, BST_CHECKED
);
115 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT1
, imgXRes
, FALSE
);
116 SetDlgItemInt(hwnd
, IDD_ATTRIBUTESEDIT2
, imgYRes
, FALSE
);
128 return DialogBox(hProgInstance
, MAKEINTRESOURCE(IDD_ATTRIBUTES
), hMainWnd
, (DLGPROC
)ATTDlgWinProc
);
131 LRESULT CALLBACK
CHSIZEDlgWinProc (HWND hwnd
, UINT message
, WPARAM wParam
, LPARAM lParam
)
136 SetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT1
, 100, FALSE
);
137 SetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT2
, 100, FALSE
);
143 switch (LOWORD(wParam
))
146 EndDialog(hwnd
, GetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT1
, NULL
, FALSE
) | (GetDlgItemInt(hwnd
, IDD_CHANGESIZEEDIT2
, NULL
, FALSE
)<<16));
161 return DialogBox(hProgInstance
, MAKEINTRESOURCE(IDD_CHANGESIZE
), hMainWnd
, (DLGPROC
)CHSIZEDlgWinProc
);