Module: wine Branch: master Commit: f815b8b9d5fe68d8d2a17c64e84b4a027a14beda URL: http://source.winehq.org/git/wine.git/?a=commit;h=f815b8b9d5fe68d8d2a17c64e8...
Author: Jan de Mooij jandemooij@gmail.com Date: Fri Sep 5 11:17:53 2008 +0200
comdlg32/printdlg: Leave FromPages/ToPages empty if it contains max. WORD value.
---
dlls/comdlg32/printdlg.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index bc49bfc..ccf5145 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -956,9 +956,12 @@ BOOL PRINTDLG_ChangePrinterA(HWND hDlg, char *name, lpdm = PrintStructures->lpDevMode; /* use this as a shortcut */
if(!(lppd->Flags & PD_PRINTSETUP)) { - /* Print range (All/Range/Selection) */ - SetDlgItemInt(hDlg, edt1, lppd->nFromPage, FALSE); - SetDlgItemInt(hDlg, edt2, lppd->nToPage, FALSE); + /* Print range (All/Range/Selection) */ + if(lppd->nFromPage != 0xffff) + SetDlgItemInt(hDlg, edt1, lppd->nFromPage, FALSE); + if(lppd->nToPage != 0xffff) + SetDlgItemInt(hDlg, edt2, lppd->nToPage, FALSE); + CheckRadioButton(hDlg, rad1, rad3, rad1); /* default */ if (lppd->Flags & PD_NOSELECTION) EnableWindow(GetDlgItem(hDlg, rad2), FALSE); @@ -1160,9 +1163,12 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name, lpdm = PrintStructures->lpDevMode; /* use this as a shortcut */
if(!(lppd->Flags & PD_PRINTSETUP)) { - /* Print range (All/Range/Selection) */ - SetDlgItemInt(hDlg, edt1, lppd->nFromPage, FALSE); - SetDlgItemInt(hDlg, edt2, lppd->nToPage, FALSE); + /* Print range (All/Range/Selection) */ + if(lppd->nFromPage != 0xffff) + SetDlgItemInt(hDlg, edt1, lppd->nFromPage, FALSE); + if(lppd->nToPage != 0xffff) + SetDlgItemInt(hDlg, edt2, lppd->nToPage, FALSE); + CheckRadioButton(hDlg, rad1, rad3, rad1); /* default */ if (lppd->Flags & PD_NOSELECTION) EnableWindow(GetDlgItem(hDlg, rad2), FALSE);