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
fb5d0bfe
Commit
fb5d0bfe
authored
Jan 08, 2008
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Jan 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Draw margin lines in print preview.
parent
f85d8963
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
print.c
programs/wordpad/print.c
+25
-5
No files found.
programs/wordpad/print.c
View file @
fb5d0bfe
...
...
@@ -535,11 +535,31 @@ LRESULT print_preview(HWND hMainWnd)
if
(
window
.
right
!=
preview
.
window
.
right
||
window
.
bottom
!=
preview
.
window
.
bottom
)
{
DeleteDC
(
preview
.
hdcSized
),
preview
.
hdcSized
=
CreateCompatibleDC
(
hdc
);
SelectObject
(
preview
.
hdcSized
,
hBitmapScaled
);
StretchBlt
(
preview
.
hdcSized
,
0
,
0
,
bmNewWidth
,
bmNewHeight
,
preview
.
hdc
,
0
,
0
,
bmWidth
,
bmHeight
,
SRCCOPY
);
HPEN
hPen
;
int
TopMargin
=
(
int
)((
float
)
twips_to_pixels
(
fr
.
rc
.
top
,
GetDeviceCaps
(
hdc
,
LOGPIXELSX
))
*
ratio
);
int
BottomMargin
=
(
int
)((
float
)
twips_to_pixels
(
fr
.
rc
.
bottom
,
GetDeviceCaps
(
hdc
,
LOGPIXELSX
))
*
ratio
);
int
LeftMargin
=
(
int
)((
float
)
twips_to_pixels
(
fr
.
rc
.
left
,
GetDeviceCaps
(
hdc
,
LOGPIXELSY
))
*
ratio
);
int
RightMargin
=
(
int
)((
float
)
twips_to_pixels
(
fr
.
rc
.
right
,
GetDeviceCaps
(
hdc
,
LOGPIXELSY
))
*
ratio
);
DeleteDC
(
preview
.
hdcSized
);
preview
.
hdcSized
=
CreateCompatibleDC
(
hdc
);
SelectObject
(
preview
.
hdcSized
,
hBitmapScaled
);
StretchBlt
(
preview
.
hdcSized
,
0
,
0
,
bmNewWidth
,
bmNewHeight
,
preview
.
hdc
,
0
,
0
,
bmWidth
,
bmHeight
,
SRCCOPY
);
/* Draw margin lines */
hPen
=
CreatePen
(
PS_DOT
,
1
,
RGB
(
0
,
0
,
0
));
SelectObject
(
preview
.
hdcSized
,
hPen
);
MoveToEx
(
preview
.
hdcSized
,
0
,
TopMargin
,
NULL
);
LineTo
(
preview
.
hdcSized
,
bmNewWidth
,
TopMargin
);
MoveToEx
(
preview
.
hdcSized
,
0
,
BottomMargin
,
NULL
);
LineTo
(
preview
.
hdcSized
,
bmNewWidth
,
BottomMargin
);
MoveToEx
(
preview
.
hdcSized
,
LeftMargin
,
0
,
NULL
);
LineTo
(
preview
.
hdcSized
,
LeftMargin
,
bmNewHeight
);
MoveToEx
(
preview
.
hdcSized
,
RightMargin
,
0
,
NULL
);
LineTo
(
preview
.
hdcSized
,
RightMargin
,
bmNewHeight
);
}
window
.
top
=
barheight
;
...
...
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