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
8b7d1a65
Commit
8b7d1a65
authored
Jan 23, 2024
by
Brendan McGrath
Committed by
Alexandre Julliard
Mar 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Add resolutions to PRINTDLG_ChangePrinterW.
This was done in PRINTDLG_ChangePrinterA, but missing from PRINTDLG_ChangePrinterW
parent
4ec55974
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
printdlg.c
dlls/comdlg32/printdlg.c
+55
-0
No files found.
dlls/comdlg32/printdlg.c
View file @
8b7d1a65
...
@@ -1386,6 +1386,61 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name,
...
@@ -1386,6 +1386,61 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name,
if
(
lppd
->
Flags
&
PD_HIDEPRINTTOFILE
)
if
(
lppd
->
Flags
&
PD_HIDEPRINTTOFILE
)
ShowWindow
(
GetDlgItem
(
hDlg
,
chx1
),
SW_HIDE
);
ShowWindow
(
GetDlgItem
(
hDlg
,
chx1
),
SW_HIDE
);
/* Fill print quality combo, PrintDlg16 */
if
(
GetDlgItem
(
hDlg
,
cmb1
))
{
DWORD
num_resolutions
=
DeviceCapabilitiesW
(
PrintStructures
->
lpPrinterInfo
->
pPrinterName
,
PrintStructures
->
lpPrinterInfo
->
pPortName
,
DC_ENUMRESOLUTIONS
,
NULL
,
lpdm
);
if
(
num_resolutions
!=
-
1
)
{
HWND
quality
=
GetDlgItem
(
hDlg
,
cmb1
);
LONG
*
resolutions
;
WCHAR
buf
[
255
];
DWORD
i
;
int
dpiX
,
dpiY
;
HDC
printer
=
CreateDCW
(
PrintStructures
->
lpPrinterInfo
->
pDriverName
,
PrintStructures
->
lpPrinterInfo
->
pPrinterName
,
0
,
lpdm
);
resolutions
=
malloc
(
num_resolutions
*
sizeof
(
LONG
)
*
2
);
DeviceCapabilitiesW
(
PrintStructures
->
lpPrinterInfo
->
pPrinterName
,
PrintStructures
->
lpPrinterInfo
->
pPortName
,
DC_ENUMRESOLUTIONS
,
(
LPWSTR
)
resolutions
,
lpdm
);
dpiX
=
GetDeviceCaps
(
printer
,
LOGPIXELSX
);
dpiY
=
GetDeviceCaps
(
printer
,
LOGPIXELSY
);
DeleteDC
(
printer
);
SendMessageW
(
quality
,
CB_RESETCONTENT
,
0
,
0
);
for
(
i
=
0
;
i
<
(
num_resolutions
*
2
);
i
+=
2
)
{
BOOL
is_default
=
FALSE
;
LRESULT
index
;
if
(
resolutions
[
i
]
==
resolutions
[
i
+
1
])
{
if
(
dpiX
==
resolutions
[
i
])
is_default
=
TRUE
;
swprintf
(
buf
,
sizeof
(
buf
),
L"%ld dpi"
,
resolutions
[
i
]);
}
else
{
if
(
dpiX
==
resolutions
[
i
]
&&
dpiY
==
resolutions
[
i
+
1
])
is_default
=
TRUE
;
swprintf
(
buf
,
sizeof
(
buf
),
L"%ld dpi x %ld dpi"
,
resolutions
[
i
],
resolutions
[
i
+
1
]);
}
index
=
SendMessageW
(
quality
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
buf
);
if
(
is_default
)
SendMessageW
(
quality
,
CB_SETCURSEL
,
index
,
0
);
SendMessageW
(
quality
,
CB_SETITEMDATA
,
index
,
MAKELONG
(
resolutions
[
i
],
resolutions
[
i
+
1
]));
}
free
(
resolutions
);
}
}
}
else
{
/* PD_PRINTSETUP */
}
else
{
/* PD_PRINTSETUP */
BOOL
bPortrait
=
(
lpdm
->
dmOrientation
==
DMORIENT_PORTRAIT
);
BOOL
bPortrait
=
(
lpdm
->
dmOrientation
==
DMORIENT_PORTRAIT
);
...
...
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