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
aaabd9f2
Commit
aaabd9f2
authored
Jan 29, 2010
by
Dylan Smith
Committed by
Alexandre Julliard
Jan 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Fixed spacing calculations for print preview.
parent
a03bc726
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
print.c
programs/wordpad/print.c
+8
-8
No files found.
programs/wordpad/print.c
View file @
aaabd9f2
...
...
@@ -690,7 +690,7 @@ LRESULT print_preview(HWND hMainWnd)
float
ratioWidth
,
ratioHeight
,
ratio
;
int
xOffset
,
yOffset
;
int
barheight
;
float
spacing
=
2
0
.
0
;
float
spacing
=
1
0
.
0
;
HWND
hReBar
=
GetDlgItem
(
hMainWnd
,
IDC_REBAR
);
PAINTSTRUCT
ps
;
...
...
@@ -752,12 +752,12 @@ LRESULT print_preview(HWND hMainWnd)
}
barheight
=
SendMessageW
(
hReBar
,
RB_GETBARHEIGHT
,
0
,
0
);
ratioHeight
=
(
(
float
)
window
.
bottom
-
spacing
-
(
float
)
barheight
)
/
(
float
)
bmHeight
;
ratioHeight
=
(
window
.
bottom
-
spacing
*
2
-
barheight
)
/
(
float
)
bmHeight
;
if
(
preview
.
hdc2
)
ratioWidth
=
((
float
)
window
.
right
/
2
.
0
-
spacing
*
2
.
0
)
/
(
float
)
bmWidth
;
ratioWidth
=
((
window
.
right
-
spacing
*
3
)
/
2
.
0
)
/
(
float
)
bmWidth
;
else
ratioWidth
=
(
(
float
)
window
.
right
-
spacing
*
3
.
0
)
/
(
float
)
bmWidth
;
ratioWidth
=
(
window
.
right
-
spacing
*
2
)
/
(
float
)
bmWidth
;
if
(
ratioWidth
>
ratioHeight
)
ratio
=
ratioHeight
;
...
...
@@ -772,7 +772,7 @@ LRESULT print_preview(HWND hMainWnd)
if
(
!
preview
.
hdc2
)
xOffset
=
(
window
.
right
-
bmNewWidth
)
/
2
;
else
xOffset
=
(
window
.
right
-
bmNewWidth
*
2
)
/
2
;
xOffset
=
(
window
.
right
-
bmNewWidth
*
2
)
/
3
;
window
.
top
=
barheight
;
FillRect
(
hdc
,
&
window
,
GetStockObject
(
GRAY_BRUSH
));
...
...
@@ -790,8 +790,8 @@ LRESULT print_preview(HWND hMainWnd)
if
(
preview
.
hdc2
)
{
background
.
left
+=
bmNewWidth
+
spacing
;
background
.
right
+=
bmNewWidth
+
spacing
;
background
.
left
+=
bmNewWidth
+
xOffset
;
background
.
right
+=
bmNewWidth
+
xOffset
;
FillRect
(
hdc
,
&
background
,
GetStockObject
(
BLACK_BRUSH
));
...
...
@@ -803,7 +803,7 @@ LRESULT print_preview(HWND hMainWnd)
if
(
preview
.
hdc2
)
{
BitBlt
(
hdc
,
xOffset
+
bmNewWidth
+
spacing
,
yOffset
,
bmNewWidth
,
bmNewHeight
,
preview
.
hdcSized2
,
0
,
0
,
SRCCOPY
);
BitBlt
(
hdc
,
xOffset
*
2
+
bmNewWidth
,
yOffset
,
bmNewWidth
,
bmNewHeight
,
preview
.
hdcSized2
,
0
,
0
,
SRCCOPY
);
}
DeleteDC
(
fr
.
hdcTarget
);
...
...
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