comdlg32: PageSetupDlgW: Set paper size in printer dialog.

This commit is contained in:
Alexander Nicolaysen Sørnes 2008-01-07 22:57:37 +01:00 committed by Alexandre Julliard
parent d14ef91c92
commit a2e9b4bb0c
1 changed files with 8 additions and 2 deletions

View File

@ -2701,9 +2701,10 @@ static void PRINTDLG_PS_SetOrientationW(HWND hDlg, PageSetupDataW* pda)
}
}
static void PRINTDLG_PS_UpdatePrintDlgW(PageSetupDataW* pda)
static void PRINTDLG_PS_UpdatePrintDlgW(PageSetupDataW* pda, HWND hDlg)
{
DEVMODEW* dm;
DWORD sel;
dm = GlobalLock(pda->pdlg.hDevMode);
@ -2715,6 +2716,11 @@ static void PRINTDLG_PS_UpdatePrintDlgW(PageSetupDataW* pda)
else
dm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
sel = SendDlgItemMessageW(hDlg, cmb2, CB_GETCURSEL, 0, 0);
if(sel != CB_ERR)
dm->u1.s1.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2, CB_GETITEMDATA, sel, 0);
GlobalUnlock(pda->pdlg.hDevMode);
}
@ -3002,7 +3008,7 @@ PRINTDLG_PS_WMCommandW(
case psh3: {
pda->pdlg.Flags = 0;
pda->pdlg.hwndOwner = hDlg;
PRINTDLG_PS_UpdatePrintDlgW(pda);
PRINTDLG_PS_UpdatePrintDlgW(pda, hDlg);
if (PrintDlgW(&(pda->pdlg)))
PRINTDLG_PS_ChangePrinterW(hDlg,pda);
return TRUE;