Commit a2e9b4bb authored by Alexander Nicolaysen Sørnes's avatar Alexander Nicolaysen Sørnes Committed by Alexandre Julliard

comdlg32: PageSetupDlgW: Set paper size in printer dialog.

parent d14ef91c
......@@ -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;
......
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