comdlg32: PageSetupDlgA: Swap margins when changing orientation.
This commit is contained in:
parent
121048a6ee
commit
74d99ac3ac
|
@ -2791,20 +2791,29 @@ PRINTDLG_PS_WMCommandA(
|
|||
}
|
||||
return TRUE;
|
||||
case rad1:
|
||||
if (pda->curdlg.ptPaperSize.x > pda->curdlg.ptPaperSize.y){
|
||||
DWORD tmp = pda->curdlg.ptPaperSize.x;
|
||||
pda->curdlg.ptPaperSize.x = pda->curdlg.ptPaperSize.y;
|
||||
pda->curdlg.ptPaperSize.y = tmp;
|
||||
}
|
||||
PRINTDLG_PS_ChangePaperPrev(pda);
|
||||
break;
|
||||
case rad2:
|
||||
if (pda->curdlg.ptPaperSize.y > pda->curdlg.ptPaperSize.x){
|
||||
if((id == rad1 && pda->curdlg.ptPaperSize.x > pda->curdlg.ptPaperSize.y) ||
|
||||
(id == rad2 && pda->curdlg.ptPaperSize.y > pda->curdlg.ptPaperSize.x))
|
||||
{
|
||||
char TmpText[25];
|
||||
char TmpText2[25];
|
||||
DWORD tmp = pda->curdlg.ptPaperSize.x;
|
||||
|
||||
pda->curdlg.ptPaperSize.x = pda->curdlg.ptPaperSize.y;
|
||||
pda->curdlg.ptPaperSize.y = tmp;
|
||||
}
|
||||
|
||||
GetDlgItemTextA(hDlg, edt4, TmpText, sizeof(TmpText));
|
||||
GetDlgItemTextA(hDlg, edt5, TmpText2, sizeof(TmpText2));
|
||||
SetDlgItemTextA(hDlg, edt5, TmpText);
|
||||
SetDlgItemTextA(hDlg, edt4, TmpText2);
|
||||
|
||||
GetDlgItemTextA(hDlg, edt6, TmpText, sizeof(TmpText));
|
||||
GetDlgItemTextA(hDlg, edt7, TmpText2, sizeof(TmpText2));
|
||||
SetDlgItemTextA(hDlg, edt7, TmpText);
|
||||
SetDlgItemTextA(hDlg, edt6, TmpText2);
|
||||
|
||||
PRINTDLG_PS_ChangePaperPrev(pda);
|
||||
}
|
||||
break;
|
||||
case cmb1: /* Printer combo */
|
||||
if(msg == CBN_SELCHANGE){
|
||||
|
|
Loading…
Reference in New Issue