comdlg32: PageSetupDlgW: Set paper size in printer dialog.
This commit is contained in:
parent
d14ef91c92
commit
a2e9b4bb0c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue