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
bfa38450
Commit
bfa38450
authored
Jan 21, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Jan 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Move handling of the 'Properties' button to a separate function.
parent
e280bf66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
39 deletions
+54
-39
printdlg.c
dlls/comdlg32/printdlg.c
+54
-39
No files found.
dlls/comdlg32/printdlg.c
View file @
bfa38450
...
...
@@ -3211,6 +3211,57 @@ static void pagesetup_update_orientation_buttons(HWND hDlg, const PageSetupDataA
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad1
);
}
/****************************************************************************************
* pagesetup_printer_properties
*
* Handle invocation of the 'Properties' button (not present in the default template).
*/
static
void
pagesetup_printer_properties
(
HWND
hDlg
,
PageSetupDataA
*
data
)
{
HANDLE
hprn
;
LPWSTR
devname
;
DEVMODEW
*
dm
;
LRESULT
count
;
int
i
;
devname
=
pagesetup_get_devname
(
data
);
if
(
!
OpenPrinterW
(
devname
,
&
hprn
,
NULL
))
{
FIXME
(
"Call to OpenPrinter did not succeed!
\n
"
);
pagesetup_release_devname
(
data
,
devname
);
return
;
}
dm
=
pagesetup_get_devmode
(
data
);
DocumentPropertiesW
(
hDlg
,
hprn
,
devname
,
dm
,
dm
,
DM_IN_BUFFER
|
DM_OUT_BUFFER
|
DM_IN_PROMPT
);
pagesetup_set_devmode
(
data
,
dm
);
pagesetup_release_devmode
(
data
,
dm
);
pagesetup_release_devname
(
data
,
devname
);
ClosePrinter
(
hprn
);
/* Changing paper */
pagesetup_update_papersize
(
data
);
pagesetup_update_orientation_buttons
(
hDlg
,
data
);
/* Changing paper preview */
PRINTDLG_PS_ChangePaperPrev
(
data
);
/* Selecting paper in combo */
count
=
SendDlgItemMessageW
(
hDlg
,
cmb2
,
CB_GETCOUNT
,
0
,
0
);
if
(
count
!=
CB_ERR
)
{
WORD
paperword
=
pagesetup_get_papersize
(
data
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
SendDlgItemMessageW
(
hDlg
,
cmb2
,
CB_GETITEMDATA
,
i
,
0
)
==
paperword
)
{
SendDlgItemMessageW
(
hDlg
,
cmb2
,
CB_SETCURSEL
,
i
,
0
);
break
;
}
}
}
}
/********************************************************************************
* PRINTDLG_PS_WMCommandA
* process WM_COMMAND message for PageSetupDlgA
...
...
@@ -3287,45 +3338,9 @@ PRINTDLG_PS_WMCommandA(
pagesetup_set_defaultsource
(
pda
,
source
);
}
break
;
case
psh2
:
/* Printer Properties button */
{
HANDLE
hPrinter
;
char
PrinterName
[
256
];
DEVMODEA
*
dm
;
LRESULT
count
;
int
i
;
GetDlgItemTextA
(
hDlg
,
cmb1
,
PrinterName
,
255
);
if
(
!
OpenPrinterA
(
PrinterName
,
&
hPrinter
,
NULL
))
{
FIXME
(
"Call to OpenPrinter did not succeed!
\n
"
);
break
;
}
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
DocumentPropertiesA
(
hDlg
,
hPrinter
,
PrinterName
,
dm
,
dm
,
DM_IN_BUFFER
|
DM_OUT_BUFFER
|
DM_IN_PROMPT
);
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
ClosePrinter
(
hPrinter
);
/* Changing paper */
pagesetup_update_papersize
(
pda
);
pagesetup_update_orientation_buttons
(
hDlg
,
pda
);
/* Changing paper preview */
PRINTDLG_PS_ChangePaperPrev
(
pda
);
/* Selecting paper in combo */
count
=
SendDlgItemMessageW
(
hDlg
,
cmb2
,
CB_GETCOUNT
,
0
,
0
);
if
(
count
!=
CB_ERR
)
{
WORD
paperword
=
pagesetup_get_papersize
(
pda
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
SendDlgItemMessageW
(
hDlg
,
cmb2
,
CB_GETITEMDATA
,
i
,
0
)
==
paperword
)
{
SendDlgItemMessageW
(
hDlg
,
cmb2
,
CB_SETCURSEL
,
i
,
0
);
break
;
}
}
}
break
;
}
case
psh2
:
/* Printer Properties button */
pagesetup_printer_properties
(
hDlg
,
pda
);
break
;
case
edt4
:
case
edt5
:
case
edt6
:
...
...
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