Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
562dd4ab
Commit
562dd4ab
authored
Jan 19, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Jan 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Add helpers for getting and setting the devmode papersize.
parent
c1209a68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
printdlg.c
dlls/comdlg32/printdlg.c
+24
-8
No files found.
dlls/comdlg32/printdlg.c
View file @
562dd4ab
...
...
@@ -2575,13 +2575,28 @@ static WORD pagesetup_get_orientation(PageSetupDataA *pda)
return
orient
;
}
static
void
pagesetup_set_papersize
(
PageSetupDataA
*
pda
,
WORD
paper
)
{
DEVMODEA
*
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
dm
->
u1
.
s1
.
dmPaperSize
=
paper
;
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
}
static
WORD
pagesetup_get_papersize
(
PageSetupDataA
*
pda
)
{
DEVMODEA
*
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
WORD
paper
=
dm
->
u1
.
s1
.
dmPaperSize
;
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
return
paper
;
}
static
BOOL
pagesetup_update_papersize
(
PageSetupDataA
*
pda
)
{
DEVNAMES
*
dn
;
DEVMODEA
*
dm
;
LPSTR
devname
,
portname
;
int
i
,
num
;
WORD
*
words
=
NULL
;
WORD
*
words
=
NULL
,
paperword
;
POINT
*
points
=
NULL
;
BOOL
retval
=
FALSE
;
...
...
@@ -2612,13 +2627,15 @@ static BOOL pagesetup_update_papersize(PageSetupDataA *pda)
goto
end
;
}
paperword
=
pagesetup_get_papersize
(
pda
);
for
(
i
=
0
;
i
<
num
;
i
++
)
if
(
words
[
i
]
==
dm
->
u1
.
s1
.
dmPaperSize
)
if
(
words
[
i
]
==
paperword
)
break
;
if
(
i
==
num
)
{
FIXME
(
"Papersize %d not found in list?
\n
"
,
dm
->
u1
.
s1
.
dmPaperSize
);
FIXME
(
"Papersize %d not found in list?
\n
"
,
paperword
);
goto
end
;
}
...
...
@@ -3046,9 +3063,7 @@ PRINTDLG_PS_WMCommandA(
SendDlgItemMessageA
(
hDlg
,
cmb2
,
CB_GETCURSEL
,
0
,
0
),
0
);
if
(
paperword
!=
CB_ERR
)
{
DEVMODEA
*
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
dm
->
u1
.
s1
.
dmPaperSize
=
paperword
;
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
pagesetup_set_papersize
(
pda
,
paperword
);
pagesetup_update_papersize
(
pda
);
PRINTDLG_PS_ChangePaperPrev
(
pda
);
}
else
...
...
@@ -3090,9 +3105,10 @@ PRINTDLG_PS_WMCommandA(
PRINTDLG_PS_ChangePaperPrev
(
pda
);
/* Selecting paper in combo */
count
=
SendDlgItemMessageA
(
hDlg
,
cmb2
,
CB_GETCOUNT
,
0
,
0
);
if
(
count
!=
CB_ERR
){
if
(
count
!=
CB_ERR
)
{
WORD
paperword
=
pagesetup_get_papersize
(
pda
);
for
(
i
=
0
;
i
<
count
;
++
i
){
if
(
SendDlgItemMessageA
(
hDlg
,
cmb2
,
CB_GETITEMDATA
,
i
,
0
)
==
dm
->
u1
.
s1
.
dmPaperSize
)
{
if
(
SendDlgItemMessageA
(
hDlg
,
cmb2
,
CB_GETITEMDATA
,
i
,
0
)
==
paperword
)
{
SendDlgItemMessageA
(
hDlg
,
cmb2
,
CB_SETCURSEL
,
i
,
0
);
break
;
}
...
...
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