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
ff0b2edd
Commit
ff0b2edd
authored
Aug 25, 2005
by
Vitaly Lipatov
Committed by
Alexandre Julliard
Aug 25, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore paper orientation when pagesetupdlg is initializing.
parent
cee9a0f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
printdlg.c
dlls/commdlg/printdlg.c
+12
-7
No files found.
dlls/commdlg/printdlg.c
View file @
ff0b2edd
...
...
@@ -2968,7 +2968,7 @@ PRINTDLG_PagePaintProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HDC
hdc
;
HBRUSH
hbrush
,
holdbrush
;
PageSetupDataA
*
pda
;
int
papersize
=
0
,
orientation
=
0
;
/* FIXME: set this values */
int
papersize
=
0
,
orientation
=
0
;
/* FIXME: set this values
for user paint hook
*/
double
scalx
,
scaly
;
#define CALLPAINTHOOK(msg,lprc) PRINTDLG_DefaultPagePaintHook( hWnd, msg, (WPARAM)hdc, (LPARAM)lprc, pda)
...
...
@@ -3085,11 +3085,8 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* FIXME: Paint hook. Must it be at begin of initializtion or at end? */
res
=
TRUE
;
if
(
pda
->
dlga
->
Flags
&
PSD_ENABLEPAGESETUPHOOK
)
{
res
=
pda
->
dlga
->
lpfnPageSetupHook
(
hDlg
,
uMsg
,
wParam
,(
LPARAM
)
pda
->
dlga
);
if
(
!
res
)
{
if
(
!
pda
->
dlga
->
lpfnPageSetupHook
(
hDlg
,
uMsg
,
wParam
,(
LPARAM
)
pda
->
dlga
))
FIXME
(
"Setup page hook failed?
\n
"
);
res
=
TRUE
;
}
}
/* if printer button disabled */
...
...
@@ -3102,11 +3099,14 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
EnableWindow
(
GetDlgItem
(
hDlg
,
edt6
),
FALSE
);
EnableWindow
(
GetDlgItem
(
hDlg
,
edt7
),
FALSE
);
}
/* width larger as height -> landscape */
if
(
pda
->
dlga
->
ptPaperSize
.
x
>
pda
->
dlga
->
ptPaperSize
.
y
)
/* Set orientation radiobutton properly */
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
if
(
dm
->
u1
.
s1
.
dmOrientation
==
DMORIENT_LANDSCAPE
)
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad2
);
else
/* this is default if papersize is not set */
CheckRadioButton
(
hDlg
,
rad1
,
rad2
,
rad1
);
GlobalUnlock
(
pda
->
dlga
->
hDevMode
);
/* if orientation disabled */
if
(
pda
->
dlga
->
Flags
&
PSD_DISABLEORIENTATION
)
{
EnableWindow
(
GetDlgItem
(
hDlg
,
rad1
),
FALSE
);
...
...
@@ -3151,6 +3151,11 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
GlobalUnlock
(
pda
->
pdlg
.
hDevMode
);
pda
->
curdlg
.
ptPaperSize
.
x
=
_c_10mm2size
(
pda
->
dlga
,
pda
->
curdlg
.
ptPaperSize
.
x
);
pda
->
curdlg
.
ptPaperSize
.
y
=
_c_10mm2size
(
pda
->
dlga
,
pda
->
curdlg
.
ptPaperSize
.
y
);
if
(
IsDlgButtonChecked
(
hDlg
,
rad2
)
==
BST_CHECKED
)
{
/* Landscape orientation */
DWORD
tmp
=
pda
->
curdlg
.
ptPaperSize
.
y
;
pda
->
curdlg
.
ptPaperSize
.
y
=
pda
->
curdlg
.
ptPaperSize
.
x
;
pda
->
curdlg
.
ptPaperSize
.
x
=
tmp
;
}
}
else
WARN
(
"GlobalLock(pda->pdlg.hDevMode) fail? hDevMode=%ld"
,
(
DWORD
)
pda
->
pdlg
.
hDevMode
);
/* Drawing paper prev */
...
...
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