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

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


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

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

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

---

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

diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c
index 1dfb8ae..7e805ad 100644
--- a/dlls/comdlg32/printdlg.c
+++ b/dlls/comdlg32/printdlg.c
@@ -2965,7 +2965,11 @@ PRINTDLG_PS_WMCommandA(
 	if(msg == CBN_SELCHANGE){
 	    DWORD paperword = SendDlgItemMessageA(hDlg,cmb2,CB_GETITEMDATA,
 	        SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0), 0);
-   	    if (paperword != CB_ERR) {
+            if (paperword != CB_ERR)
+            {
+                DEVMODEA *dm = GlobalLock(pda->dlga->hDevMode);
+                dm->u1.s1.dmPaperSize = paperword;
+                GlobalUnlock(pda->dlga->hDevMode);
                 pagesetup_papersizeA(pda->dlga, paperword, &(pda->dlga->ptPaperSize));
 		if (IsDlgButtonChecked(hDlg, rad2)) {
                     DWORD tmp = pda->dlga->ptPaperSize.x;




More information about the wine-cvs mailing list