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

This commit is contained in:
Huw Davies 2009-01-14 14:42:53 +00:00 committed by Alexandre Julliard
parent 41e9dd3d80
commit 34c771bd9a
1 changed files with 4 additions and 0 deletions

View File

@ -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);