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
1065d524
Commit
1065d524
authored
Aug 23, 2007
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Aug 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: PageSetupDlgA/W: Avoid crash when not passed a DEVMODE structure.
parent
b93cb5f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
printdlg.c
dlls/comdlg32/printdlg.c
+20
-13
No files found.
dlls/comdlg32/printdlg.c
View file @
1065d524
...
...
@@ -3167,12 +3167,15 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
EnableWindow
(
GetDlgItem
(
hDlg
,
edt7
),
FALSE
);
}
/* 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
(
pda
->
dlga
->
hDevMode
)
{
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
)
{
...
...
@@ -3280,13 +3283,17 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
EnableWindow
(
GetDlgItem
(
hDlg
,
edt7
),
FALSE
);
}
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
/* Landscape orientation */
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
(
pda
->
dlga
->
hDevMode
)
{
dm
=
GlobalLock
(
pda
->
dlga
->
hDevMode
);
/* Landscape orientation */
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
(
pda
->
dlga
->
Flags
&
PSD_DISABLEORIENTATION
)
{
EnableWindow
(
GetDlgItem
(
hDlg
,
rad1
),
FALSE
);
EnableWindow
(
GetDlgItem
(
hDlg
,
rad2
),
FALSE
);
...
...
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