Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
507aeb68
Commit
507aeb68
authored
Dec 09, 2007
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Dec 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: PageSetupDlgW: Swap margins when changing orientation.
parent
74d99ac3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
1 deletion
+43
-1
printdlg.c
dlls/comdlg32/printdlg.c
+43
-1
No files found.
dlls/comdlg32/printdlg.c
View file @
507aeb68
...
...
@@ -2340,6 +2340,7 @@ typedef struct {
typedef
struct
{
LPPAGESETUPDLGW
dlga
;
PRINTDLGW
pdlg
;
PAGESETUPDLGW
curdlg
;
/* Current dialog state */
}
PageSetupDataW
;
...
...
@@ -2930,6 +2931,30 @@ PRINTDLG_PS_WMCommandW(
EndDialog
(
hDlg
,
FALSE
);
return
FALSE
;
case
rad1
:
case
rad2
:
if
((
LOWORD
(
wParam
)
==
rad1
&&
pda
->
curdlg
.
ptPaperSize
.
x
>
pda
->
curdlg
.
ptPaperSize
.
y
)
||
(
LOWORD
(
wParam
)
==
rad2
&&
pda
->
curdlg
.
ptPaperSize
.
y
>
pda
->
curdlg
.
ptPaperSize
.
x
))
{
WCHAR
tmpText
[
25
];
WCHAR
tmpText2
[
25
];
DWORD
tmp
=
pda
->
curdlg
.
ptPaperSize
.
y
;
pda
->
curdlg
.
ptPaperSize
.
y
=
pda
->
curdlg
.
ptPaperSize
.
x
;
pda
->
curdlg
.
ptPaperSize
.
x
=
tmp
;
GetDlgItemTextW
(
hDlg
,
edt4
,
tmpText
,
sizeof
(
tmpText
)
/
sizeof
(
WCHAR
));
GetDlgItemTextW
(
hDlg
,
edt5
,
tmpText2
,
sizeof
(
tmpText2
)
/
sizeof
(
WCHAR
));
SetDlgItemTextW
(
hDlg
,
edt5
,
tmpText
);
SetDlgItemTextW
(
hDlg
,
edt4
,
tmpText2
);
GetDlgItemTextW
(
hDlg
,
edt6
,
tmpText
,
sizeof
(
tmpText
)
/
sizeof
(
WCHAR
));
GetDlgItemTextW
(
hDlg
,
edt7
,
tmpText2
,
sizeof
(
tmpText2
)
/
sizeof
(
WCHAR
));
SetDlgItemTextW
(
hDlg
,
edt7
,
tmpText
);
SetDlgItemTextW
(
hDlg
,
edt6
,
tmpText2
);
}
break
;
case
psh3
:
{
pda
->
pdlg
.
Flags
=
0
;
pda
->
pdlg
.
hwndOwner
=
hDlg
;
...
...
@@ -3283,6 +3308,7 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if
(
uMsg
==
WM_INITDIALOG
)
{
res
=
TRUE
;
pda
=
(
PageSetupDataW
*
)
lParam
;
memcpy
(
&
pda
->
curdlg
,
pda
,
sizeof
(
pda
->
curdlg
));
SetPropW
(
hDlg
,
__WINE_PAGESETUPDLGDATA
,
pda
);
if
(
pda
->
dlga
->
Flags
&
PSD_ENABLEPAGESETUPHOOK
)
{
res
=
pda
->
dlga
->
lpfnPageSetupHook
(
hDlg
,
uMsg
,
wParam
,(
LPARAM
)
pda
->
dlga
);
...
...
@@ -3304,15 +3330,31 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
EnableWindow
(
GetDlgItem
(
hDlg
,
edt7
),
FALSE
);
}
PRINTDLG_PS_ChangePrinterW
(
hDlg
,
pda
);
if
(
pda
->
dlga
->
hDevMode
)
{
WCHAR
PaperName
[
64
];
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
/* Landscape orientation */
if
(
dm
->
u1
.
s1
.
dmOrientation
==
DMORIENT_LANDSCAPE
)
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad2
);
else
/* this is default if papersize is not set */
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad1
);
GetDlgItemTextW
(
hDlg
,
cmb2
,
PaperName
,
sizeof
(
PaperName
)
/
sizeof
(
WCHAR
));
PRINTDLG_PaperSizeW
(
&
pda
->
pdlg
,
PaperName
,
&
pda
->
curdlg
.
ptPaperSize
);
pda
->
curdlg
.
ptPaperSize
.
x
=
_c_10mm2size
((
LPPAGESETUPDLGA
)
pda
->
dlga
,
pda
->
curdlg
.
ptPaperSize
.
x
);
pda
->
curdlg
.
ptPaperSize
.
y
=
_c_10mm2size
((
LPPAGESETUPDLGA
)
pda
->
dlga
,
pda
->
curdlg
.
ptPaperSize
.
y
);
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
if
(
IsDlgButtonChecked
(
hDlg
,
rad2
))
{
DWORD
tmp
=
pda
->
curdlg
.
ptPaperSize
.
x
;
pda
->
curdlg
.
ptPaperSize
.
x
=
pda
->
curdlg
.
ptPaperSize
.
y
;
pda
->
curdlg
.
ptPaperSize
.
y
=
tmp
;
}
}
if
(
pda
->
dlga
->
Flags
&
PSD_DISABLEORIENTATION
)
{
...
...
@@ -3340,7 +3382,7 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
SetDlgItemTextW
(
hDlg
,
edt6
,
str
);
SetDlgItemTextW
(
hDlg
,
edt7
,
str
);
}
PRINTDLG_PS_ChangePrinterW
(
hDlg
,
pda
);
if
(
pda
->
dlga
->
Flags
&
PSD_DISABLEPAPER
)
{
EnableWindow
(
GetDlgItem
(
hDlg
,
cmb2
),
FALSE
);
EnableWindow
(
GetDlgItem
(
hDlg
,
cmb3
),
FALSE
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment