mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:12:59 +00:00
[MSPAINT] Refactoring (_countof and resource.h) (#4202)
- Use Microsoft standard _countof macro instead of SIZEOF. - Rename definitions.h as resource.h. - Move some macro definitions to its proper place. CORE-17931
This commit is contained in:
parent
ad49da70a1
commit
2ca3ff5bc6
9 changed files with 56 additions and 58 deletions
|
@ -88,8 +88,8 @@ LRESULT CAttributesDialog::OnInitDialog(UINT nMsg, WPARAM wParam, LPARAM lParam,
|
|||
{
|
||||
TCHAR date[100];
|
||||
TCHAR temp[100];
|
||||
GetDateFormat(LOCALE_USER_DEFAULT, 0, &fileTime, NULL, date, SIZEOF(date));
|
||||
GetTimeFormat(LOCALE_USER_DEFAULT, 0, &fileTime, NULL, temp, SIZEOF(temp));
|
||||
GetDateFormat(LOCALE_USER_DEFAULT, 0, &fileTime, NULL, date, _countof(date));
|
||||
GetTimeFormat(LOCALE_USER_DEFAULT, 0, &fileTime, NULL, temp, _countof(temp));
|
||||
_tcscat(date, _T(" "));
|
||||
_tcscat(date, temp);
|
||||
CString strSize;
|
||||
|
@ -166,17 +166,17 @@ LRESULT CAttributesDialog::OnEdit1(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOO
|
|||
TCHAR tempS[100];
|
||||
if (IsDlgButtonChecked(IDD_ATTRIBUTESRB1))
|
||||
{
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, SIZEOF(tempS));
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, _countof(tempS));
|
||||
newWidth = max(1, (int) (_tcstod(tempS, NULL) * fileHPPM * 0.0254));
|
||||
}
|
||||
else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB2))
|
||||
{
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, SIZEOF(tempS));
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, _countof(tempS));
|
||||
newWidth = max(1, (int) (_tcstod(tempS, NULL) * fileHPPM / 100));
|
||||
}
|
||||
else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB3))
|
||||
{
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, SIZEOF(tempS));
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT1, tempS, _countof(tempS));
|
||||
newWidth = max(1, _tstoi(tempS));
|
||||
}
|
||||
Edit_SetModify(hWndCtl, FALSE);
|
||||
|
@ -191,17 +191,17 @@ LRESULT CAttributesDialog::OnEdit2(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOO
|
|||
TCHAR tempS[100];
|
||||
if (IsDlgButtonChecked(IDD_ATTRIBUTESRB1))
|
||||
{
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, SIZEOF(tempS));
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, _countof(tempS));
|
||||
newHeight = max(1, (int) (_tcstod(tempS, NULL) * fileVPPM * 0.0254));
|
||||
}
|
||||
else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB2))
|
||||
{
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, SIZEOF(tempS));
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, _countof(tempS));
|
||||
newHeight = max(1, (int) (_tcstod(tempS, NULL) * fileVPPM / 100));
|
||||
}
|
||||
else if (IsDlgButtonChecked(IDD_ATTRIBUTESRB3))
|
||||
{
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, SIZEOF(tempS));
|
||||
GetDlgItemText(IDD_ATTRIBUTESEDIT2, tempS, _countof(tempS));
|
||||
newHeight = max(1, _tstoi(tempS));
|
||||
}
|
||||
Edit_SetModify(hWndCtl, FALSE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue