Huw Davies : comdlg32: Keep the DEVMODE's orientation member up to date.

Alexandre Julliard julliard at winehq.org
Wed Jan 14 09:03:49 CST 2009


Module: wine
Branch: master
Commit: 34c771bd9aaf8e6259ce6bd83c8831c3d26f85be
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=34c771bd9aaf8e6259ce6bd83c8831c3d26f85be

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Jan 14 14:42:53 2009 +0000

comdlg32: Keep the DEVMODE's orientation member up to date.

---

 dlls/comdlg32/printdlg.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c
index 4a07f04..1dfb8ae 100644
--- a/dlls/comdlg32/printdlg.c
+++ b/dlls/comdlg32/printdlg.c
@@ -2932,10 +2932,14 @@ PRINTDLG_PS_WMCommandA(
 	    char TmpText[25];
 	    char TmpText2[25];
             DWORD tmp = pda->dlga->ptPaperSize.x;
+            DEVMODEA *dm = GlobalLock(pda->dlga->hDevMode);
 
             pda->dlga->ptPaperSize.x = pda->dlga->ptPaperSize.y;
             pda->dlga->ptPaperSize.y = tmp;
 
+            dm->u1.s1.dmOrientation = (id == rad1) ? DMORIENT_PORTRAIT : DMORIENT_LANDSCAPE;
+            GlobalUnlock(pda->dlga->hDevMode);
+
 	    GetDlgItemTextA(hDlg, edt4, TmpText, sizeof(TmpText));
 	    GetDlgItemTextA(hDlg, edt5, TmpText2, sizeof(TmpText2));
 	    SetDlgItemTextA(hDlg, edt5, TmpText);




More information about the wine-cvs mailing list