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
ef5daf38
Commit
ef5daf38
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: Set the margin edit controls using unicode functions.
parent
680e5112
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
printdlg.c
dlls/comdlg32/printdlg.c
+19
-20
No files found.
dlls/comdlg32/printdlg.c
View file @
ef5daf38
...
...
@@ -2417,18 +2417,17 @@ _c_inch2size(PAGESETUPDLGA *dlga,DWORD size) {
return
(
size
*
254
)
/
100
;
}
static
void
_c_size2strA
(
PageSetupDataA
*
pda
,
DWORD
size
,
LPSTR
strout
)
{
strcpy
(
strout
,
"<undef>"
);
if
(
pda
->
dlga
->
Flags
&
PSD_INHUNDREDTHSOFMILLIMETERS
)
{
sprintf
(
strout
,
"%d"
,(
size
)
/
100
);
return
;
}
else
{
sprintf
(
strout
,
"%din"
,(
size
)
/
1000
);
return
;
}
static
void
size2str
(
PageSetupDataA
*
pda
,
DWORD
size
,
LPWSTR
strout
)
{
static
const
WCHAR
metric_format
[]
=
{
'%'
,
'd'
,
0
};
static
const
WCHAR
imperial_format
[]
=
{
'%'
,
'd'
,
'i'
,
'n'
,
0
};
if
(
pda
->
dlga
->
Flags
&
PSD_INHUNDREDTHSOFMILLIMETERS
)
wsprintfW
(
strout
,
metric_format
,
size
/
100
);
else
wsprintfW
(
strout
,
imperial_format
,
size
/
1000
);
}
static
void
_c_size2strW
(
PageSetupDataW
*
pdw
,
DWORD
size
,
LPWSTR
strout
)
{
static
const
char
mm_fmt
[]
=
"%.2f mm"
;
...
...
@@ -3263,7 +3262,7 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
HWND
hDrawWnd
;
if
(
uMsg
==
WM_INITDIALOG
)
{
/*Init dialog*/
char
str
[
100
];
WCHAR
str
[
100
];
pda
=
(
PageSetupDataA
*
)
lParam
;
pda
->
hDlg
=
hDlg
;
/* saving handle to main window to PageSetupDataA structure */
...
...
@@ -3324,14 +3323,14 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
pda
->
dlga
->
rtMargin
.
right
=
size
;
pda
->
dlga
->
rtMargin
.
bottom
=
size
;
}
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
left
,
str
);
SetDlgItemText
A
(
hDlg
,
edt4
,
str
);
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
top
,
str
);
SetDlgItemText
A
(
hDlg
,
edt5
,
str
);
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
right
,
str
);
SetDlgItemText
A
(
hDlg
,
edt6
,
str
);
_c_size2strA
(
pda
,
pda
->
dlga
->
rtMargin
.
bottom
,
str
);
SetDlgItemText
A
(
hDlg
,
edt7
,
str
);
size2str
(
pda
,
pda
->
dlga
->
rtMargin
.
left
,
str
);
SetDlgItemText
W
(
hDlg
,
edt4
,
str
);
size2str
(
pda
,
pda
->
dlga
->
rtMargin
.
top
,
str
);
SetDlgItemText
W
(
hDlg
,
edt5
,
str
);
size2str
(
pda
,
pda
->
dlga
->
rtMargin
.
right
,
str
);
SetDlgItemText
W
(
hDlg
,
edt6
,
str
);
size2str
(
pda
,
pda
->
dlga
->
rtMargin
.
bottom
,
str
);
SetDlgItemText
W
(
hDlg
,
edt7
,
str
);
/* if paper disabled */
if
(
pda
->
dlga
->
Flags
&
PSD_DISABLEPAPER
)
{
...
...
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