Alexander Nicolaysen Sørnes : comdlg32: PageSetupDlgW: Set paper size in printer dialog.
Alexandre Julliard
julliard at winehq.org
Tue Jan 8 10:21:42 CST 2008
Module: wine
Branch: master
Commit: a2e9b4bb0c07f3276bc68a195ebcf3fe109e9d6d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a2e9b4bb0c07f3276bc68a195ebcf3fe109e9d6d
Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date: Mon Jan 7 22:57:37 2008 +0100
comdlg32: PageSetupDlgW: Set paper size in printer dialog.
---
dlls/comdlg32/printdlg.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c
index 8439c31..95f4dac 100644
--- a/dlls/comdlg32/printdlg.c
+++ b/dlls/comdlg32/printdlg.c
@@ -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;
More information about the wine-cvs
mailing list