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
680e5112
Commit
680e5112
authored
Jan 15, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Jan 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Simplify the margin initialization.
parent
40bed9c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
printdlg.c
dlls/comdlg32/printdlg.c
+15
-18
No files found.
dlls/comdlg32/printdlg.c
View file @
680e5112
...
...
@@ -3263,6 +3263,8 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
HWND
hDrawWnd
;
if
(
uMsg
==
WM_INITDIALOG
)
{
/*Init dialog*/
char
str
[
100
];
pda
=
(
PageSetupDataA
*
)
lParam
;
pda
->
hDlg
=
hDlg
;
/* saving handle to main window to PageSetupDataA structure */
...
...
@@ -3311,31 +3313,26 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
EnableWindow
(
GetDlgItem
(
hDlg
,
rad1
),
FALSE
);
EnableWindow
(
GetDlgItem
(
hDlg
,
rad2
),
FALSE
);
}
/* We fill them out enabled or not */
if
(
pda
->
dlga
->
Flags
&
PSD_MARGINS
)
{
char
str
[
100
];
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
left
,
str
);
SetDlgItemTextA
(
hDlg
,
edt4
,
str
);
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
top
,
str
);
SetDlgItemTextA
(
hDlg
,
edt5
,
str
);
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
right
,
str
);
SetDlgItemTextA
(
hDlg
,
edt6
,
str
);
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
bottom
,
str
);
SetDlgItemTextA
(
hDlg
,
edt7
,
str
);
}
else
{
if
(
!
(
pda
->
dlga
->
Flags
&
PSD_MARGINS
))
{
/* default is 1 inch */
DWORD
size
=
_c_inch2size
(
pda
->
dlga
,
1000
);
char
str
[
20
];
_c_size2strA
(
pda
,
size
,
str
);
SetDlgItemTextA
(
hDlg
,
edt4
,
str
);
SetDlgItemTextA
(
hDlg
,
edt5
,
str
);
SetDlgItemTextA
(
hDlg
,
edt6
,
str
);
SetDlgItemTextA
(
hDlg
,
edt7
,
str
);
pda
->
dlga
->
rtMargin
.
left
=
size
;
pda
->
dlga
->
rtMargin
.
top
=
size
;
pda
->
dlga
->
rtMargin
.
right
=
size
;
pda
->
dlga
->
rtMargin
.
bottom
=
size
;
}
}
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
left
,
str
);
SetDlgItemTextA
(
hDlg
,
edt4
,
str
);
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
top
,
str
);
SetDlgItemTextA
(
hDlg
,
edt5
,
str
);
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
right
,
str
);
SetDlgItemTextA
(
hDlg
,
edt6
,
str
);
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
bottom
,
str
);
SetDlgItemTextA
(
hDlg
,
edt7
,
str
);
/* if paper disabled */
if
(
pda
->
dlga
->
Flags
&
PSD_DISABLEPAPER
)
{
EnableWindow
(
GetDlgItem
(
hDlg
,
cmb2
),
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