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
55f7f8b9
Commit
55f7f8b9
authored
Jan 11, 2006
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Jan 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commdlg: If provided use and update hDevMode in the PAGESETUPDLG struct.
Update the dmDefaultSourcea return value inside hDevMode.
parent
586ed7d4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
4 deletions
+37
-4
printdlg.c
dlls/commdlg/printdlg.c
+37
-4
No files found.
dlls/commdlg/printdlg.c
View file @
55f7f8b9
...
...
@@ -2480,11 +2480,14 @@ PRINTDLG_PS_UpdateDlgStructA(HWND hDlg, PageSetupDataA *pda) {
dn
=
GlobalLock
(
pda
->
pdlg
.
hDevNames
);
dm
=
GlobalLock
(
pda
->
pdlg
.
hDevMode
);
/* Save paper orientation into device context */
if
(
pda
->
curdlg
.
ptPaperSize
.
x
>
pda
->
curdlg
.
ptPaperSize
.
y
)
dm
->
u1
.
s1
.
dmOrientation
=
DMORIENT_LANDSCAPE
;
else
dm
->
u1
.
s1
.
dmOrientation
=
DMORIENT_PORTRAIT
;
/* Save paper size into the device context */
paperword
=
SendDlgItemMessageA
(
hDlg
,
cmb2
,
CB_GETITEMDATA
,
SendDlgItemMessageA
(
hDlg
,
cmb2
,
CB_GETCURSEL
,
0
,
0
),
0
);
if
(
paperword
!=
CB_ERR
)
...
...
@@ -2492,6 +2495,14 @@ PRINTDLG_PS_UpdateDlgStructA(HWND hDlg, PageSetupDataA *pda) {
else
FIXME
(
"could not get dialog text for papersize cmbbox?
\n
"
);
/* Save paper source into the device context */
paperword
=
SendDlgItemMessageA
(
hDlg
,
cmb1
,
CB_GETITEMDATA
,
SendDlgItemMessageA
(
hDlg
,
cmb1
,
CB_GETCURSEL
,
0
,
0
),
0
);
if
(
paperword
!=
CB_ERR
)
dm
->
dmDefaultSource
=
paperword
;
else
FIXME
(
"could not get dialog text for papersize cmbbox?
\n
"
);
GlobalUnlock
(
pda
->
pdlg
.
hDevNames
);
GlobalUnlock
(
pda
->
pdlg
.
hDevMode
);
...
...
@@ -2510,7 +2521,10 @@ PRINTDLG_PS_UpdateDlgStructW(HWND hDlg, PageSetupDataW *pda) {
dm
=
GlobalLock
(
pda
->
pdlg
.
hDevMode
);
devname
=
((
WCHAR
*
)
dn
)
+
dn
->
wDeviceOffset
;
portname
=
((
WCHAR
*
)
dn
)
+
dn
->
wOutputOffset
;
/* Save paper size into device context */
PRINTDLG_SetUpPaperComboBoxW
(
hDlg
,
cmb2
,
devname
,
portname
,
dm
);
/* Save paper source into device context */
PRINTDLG_SetUpPaperComboBoxW
(
hDlg
,
cmb3
,
devname
,
portname
,
dm
);
if
(
GetDlgItemTextW
(
hDlg
,
cmb2
,
papername
,
sizeof
(
papername
))
>
0
)
{
...
...
@@ -3345,19 +3359,25 @@ BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA setupdlg) {
return
FALSE
;
}
/* First get default printer data, we need it right after that. */
/* Initialize default printer struct. If no printer device info is specified
retrieve the default printer data. */
memset
(
&
pdlg
,
0
,
sizeof
(
pdlg
));
pdlg
.
lStructSize
=
sizeof
(
pdlg
);
if
(
setupdlg
->
hDevMode
&&
setupdlg
->
hDevNames
)
{
pdlg
.
hDevMode
=
setupdlg
->
hDevMode
;
pdlg
.
hDevNames
=
setupdlg
->
hDevNames
;
}
else
{
pdlg
.
Flags
=
PD_RETURNDEFAULT
;
bRet
=
PrintDlgA
(
&
pdlg
);
if
(
!
bRet
){
if
(
!
(
setupdlg
->
Flags
&
PSD_NOWARNING
))
{
if
(
!
(
setupdlg
->
Flags
&
PSD_NOWARNING
))
{
char
errstr
[
256
];
LoadStringA
(
COMDLG32_hInstance
,
PD32_NO_DEFAULT_PRINTER
,
errstr
,
255
);
MessageBoxA
(
setupdlg
->
hwndOwner
,
errstr
,
0
,
MB_OK
|
MB_ICONERROR
);
}
return
FALSE
;
}
}
/* short cut exit, just return default values */
if
(
setupdlg
->
Flags
&
PSD_RETURNDEFAULT
)
{
...
...
@@ -3427,12 +3447,25 @@ BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW setupdlg) {
setupdlg
->
hInstance
,
setupdlg
->
Flags
,
flagstr
);
}
/* First get default printer data, we need it right after that. */
/* Initialize default printer struct. If no printer device info is specified
retrieve the default printer data. */
memset
(
&
pdlg
,
0
,
sizeof
(
pdlg
));
pdlg
.
lStructSize
=
sizeof
(
pdlg
);
if
(
setupdlg
->
hDevMode
&&
setupdlg
->
hDevNames
)
{
pdlg
.
hDevMode
=
setupdlg
->
hDevMode
;
pdlg
.
hDevNames
=
setupdlg
->
hDevNames
;
}
else
{
pdlg
.
Flags
=
PD_RETURNDEFAULT
;
bRet
=
PrintDlgW
(
&
pdlg
);
if
(
!
bRet
)
return
FALSE
;
if
(
!
bRet
){
if
(
!
(
setupdlg
->
Flags
&
PSD_NOWARNING
))
{
WCHAR
errstr
[
256
];
LoadStringW
(
COMDLG32_hInstance
,
PD32_NO_DEFAULT_PRINTER
,
errstr
,
255
);
MessageBoxW
(
setupdlg
->
hwndOwner
,
errstr
,
0
,
MB_OK
|
MB_ICONERROR
);
}
return
FALSE
;
}
}
/* short cut exit, just return default values */
if
(
setupdlg
->
Flags
&
PSD_RETURNDEFAULT
)
{
...
...
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