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
8487a5dc
Commit
8487a5dc
authored
Jan 29, 2008
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Feb 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commdlg: PrintDlg16: Handle print quality combobox.
parent
9f63253d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
2 deletions
+71
-2
printdlg.c
dlls/comdlg32/printdlg.c
+71
-2
No files found.
dlls/comdlg32/printdlg.c
View file @
8487a5dc
...
...
@@ -362,6 +362,21 @@ static BOOL PRINTDLG_UpdatePrintDlgA(HWND hDlg,
lppd
->
Flags
&=
~
PD_COLLATE
;
lppd
->
nCopies
=
GetDlgItemInt
(
hDlg
,
edt3
,
NULL
,
FALSE
);
}
/* Print quality, PrintDlg16 */
if
(
GetDlgItem
(
hDlg
,
cmb1
))
{
HWND
hQuality
=
GetDlgItem
(
hDlg
,
cmb1
);
int
Sel
=
SendMessageA
(
hQuality
,
CB_GETCURSEL
,
0
,
0
);
if
(
Sel
!=
CB_ERR
)
{
LONG
dpi
=
SendMessageA
(
hQuality
,
CB_GETITEMDATA
,
Sel
,
0
);
lpdm
->
dmFields
|=
DM_PRINTQUALITY
|
DM_YRESOLUTION
;
lpdm
->
u1
.
s1
.
dmPrintQuality
=
LOWORD
(
dpi
);
lpdm
->
dmYResolution
=
HIWORD
(
dpi
);
}
}
}
return
TRUE
;
}
...
...
@@ -997,6 +1012,61 @@ BOOL PRINTDLG_ChangePrinterA(HWND hDlg, char *name,
if
(
lppd
->
Flags
&
PD_HIDEPRINTTOFILE
)
ShowWindow
(
GetDlgItem
(
hDlg
,
chx1
),
SW_HIDE
);
/* Fill print quality combo, PrintDlg16 */
if
(
GetDlgItem
(
hDlg
,
cmb1
))
{
DWORD
numResolutions
=
DeviceCapabilitiesA
(
PrintStructures
->
lpPrinterInfo
->
pPrinterName
,
PrintStructures
->
lpPrinterInfo
->
pPortName
,
DC_ENUMRESOLUTIONS
,
NULL
,
lpdm
);
if
(
numResolutions
!=
-
1
)
{
HWND
hQuality
=
GetDlgItem
(
hDlg
,
cmb1
);
LONG
*
Resolutions
;
char
buf
[
255
];
int
i
;
int
dpiX
,
dpiY
;
HDC
hPrinterDC
=
CreateDCA
(
PrintStructures
->
lpPrinterInfo
->
pDriverName
,
PrintStructures
->
lpPrinterInfo
->
pPrinterName
,
0
,
lpdm
);
Resolutions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
numResolutions
*
sizeof
(
LONG
)
*
2
);
DeviceCapabilitiesA
(
PrintStructures
->
lpPrinterInfo
->
pPrinterName
,
PrintStructures
->
lpPrinterInfo
->
pPortName
,
DC_ENUMRESOLUTIONS
,
(
LPSTR
)
Resolutions
,
lpdm
);
dpiX
=
GetDeviceCaps
(
hPrinterDC
,
LOGPIXELSX
);
dpiY
=
GetDeviceCaps
(
hPrinterDC
,
LOGPIXELSY
);
DeleteDC
(
hPrinterDC
);
SendMessageA
(
hQuality
,
CB_RESETCONTENT
,
0
,
0
);
for
(
i
=
0
;
i
<
(
numResolutions
*
2
);
i
+=
2
)
{
BOOL
IsDefault
=
FALSE
;
LRESULT
Index
;
if
(
Resolutions
[
i
]
==
Resolutions
[
i
+
1
])
{
if
(
dpiX
==
Resolutions
[
i
])
IsDefault
=
TRUE
;
sprintf
(
buf
,
"%d dpi"
,
Resolutions
[
i
]);
}
else
{
if
(
dpiX
==
Resolutions
[
i
]
&&
dpiY
==
Resolutions
[
i
+
1
])
IsDefault
=
TRUE
;
sprintf
(
buf
,
"%d dpi x %d dpi"
,
Resolutions
[
i
],
Resolutions
[
i
+
1
]);
}
Index
=
SendMessageA
(
hQuality
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
buf
);
if
(
IsDefault
)
SendMessageA
(
hQuality
,
CB_SETCURSEL
,
Index
,
0
);
SendMessageA
(
hQuality
,
CB_SETITEMDATA
,
Index
,
MAKELONG
(
dpiX
,
dpiY
));
}
HeapFree
(
GetProcessHeap
(),
0
,
Resolutions
);
}
}
}
else
{
/* PD_PRINTSETUP */
BOOL
bPortrait
=
(
lpdm
->
u1
.
s1
.
dmOrientation
==
DMORIENT_PORTRAIT
);
...
...
@@ -1536,9 +1606,8 @@ LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam,
}
break
;
case
cmb1
:
/* Printer Combobox in PRINT SETUP, quality combobox in PRINT */
case
cmb1
:
/* Printer Combobox in PRINT SETUP, quality combobox in PRINT
16
*/
if
(
PrinterComboID
!=
LOWORD
(
wParam
))
{
FIXME
(
"No handling for print quality combo box yet.
\n
"
);
break
;
}
/* FALLTHROUGH */
...
...
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