Commit f9f881bf authored by Jan de Mooij's avatar Jan de Mooij Committed by Alexandre Julliard

comdlg32/printdlg: If ToPages field is left empty set it to FromPages value.

parent e55a7029
......@@ -309,8 +309,13 @@ static BOOL PRINTDLG_UpdatePrintDlgA(HWND hDlg,
if (IsDlgButtonChecked(hDlg, rad3) == BST_CHECKED) { /* Pages */
WORD nToPage;
WORD nFromPage;
BOOL translated;
nFromPage = GetDlgItemInt(hDlg, edt1, NULL, FALSE);
nToPage = GetDlgItemInt(hDlg, edt2, NULL, FALSE);
nToPage = GetDlgItemInt(hDlg, edt2, &translated, FALSE);
/* if no ToPage value is entered, use the FromPage value */
if(!translated) nToPage = nFromPage;
if (nFromPage < lppd->nMinPage || nFromPage > lppd->nMaxPage ||
nToPage < lppd->nMinPage || nToPage > lppd->nMaxPage) {
WCHAR resourcestr[256];
......@@ -407,8 +412,13 @@ static BOOL PRINTDLG_UpdatePrintDlgW(HWND hDlg,
if (IsDlgButtonChecked(hDlg, rad3) == BST_CHECKED) { /* Pages */
WORD nToPage;
WORD nFromPage;
BOOL translated;
nFromPage = GetDlgItemInt(hDlg, edt1, NULL, FALSE);
nToPage = GetDlgItemInt(hDlg, edt2, NULL, FALSE);
nToPage = GetDlgItemInt(hDlg, edt2, &translated, FALSE);
/* if no ToPage value is entered, use the FromPage value */
if(!translated) nToPage = nFromPage;
if (nFromPage < lppd->nMinPage || nFromPage > lppd->nMaxPage ||
nToPage < lppd->nMinPage || nToPage > lppd->nMaxPage) {
WCHAR resourcestr[256];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment