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
7451facf
Commit
7451facf
authored
Feb 22, 2010
by
Dylan Smith
Committed by
Alexandre Julliard
Feb 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Added missing calls to DeleteDC and ReleaseDC.
parent
fe9933ae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
print.c
programs/wordpad/print.c
+7
-2
No files found.
programs/wordpad/print.c
View file @
7451facf
...
...
@@ -412,6 +412,7 @@ void print_quick(HWND hMainWnd, LPWSTR wszFileName)
pd
.
hDC
=
make_dc
();
print
(
&
pd
,
wszFileName
);
DeleteDC
(
pd
.
hDC
);
}
void
dialog_print
(
HWND
hMainWnd
,
LPWSTR
wszFileName
)
...
...
@@ -596,6 +597,8 @@ LRESULT CALLBACK preview_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
fr
.
chrg
.
cpMax
=
SendMessageW
(
hEditorWnd
,
EM_GETTEXTLENGTHEX
,
(
WPARAM
)
&
gt
,
0
);
preview
.
pages
=
get_num_pages
(
hEditorWnd
,
fr
);
DeleteDC
(
fr
.
hdc
);
DeleteDC
(
hdcTarget
);
ReleaseDC
(
hWnd
,
hdc
);
update_preview_sizes
(
hWnd
,
TRUE
);
break
;
...
...
@@ -845,7 +848,7 @@ LRESULT CALLBACK ruler_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static
void
draw_preview_page
(
HDC
hdc
,
HDC
*
hdcSized
,
FORMATRANGE
*
lpFr
,
float
ratio
,
int
bmNewWidth
,
int
bmNewHeight
,
int
bmWidth
,
int
bmHeight
)
{
HBITMAP
hBitmapScaled
=
CreateCompatibleBitmap
(
hdc
,
bmNewWidth
,
bmNewHeight
);
HPEN
hPen
;
HPEN
hPen
,
oldPen
;
int
TopMargin
=
(
int
)((
float
)
twips_to_pixels
(
lpFr
->
rc
.
top
,
GetDeviceCaps
(
hdc
,
LOGPIXELSX
))
*
ratio
);
int
BottomMargin
=
(
int
)((
float
)
twips_to_pixels
(
lpFr
->
rc
.
bottom
,
GetDeviceCaps
(
hdc
,
LOGPIXELSX
))
*
ratio
);
int
LeftMargin
=
(
int
)((
float
)
twips_to_pixels
(
lpFr
->
rc
.
left
,
GetDeviceCaps
(
hdc
,
LOGPIXELSY
))
*
ratio
);
...
...
@@ -860,7 +863,7 @@ static void draw_preview_page(HDC hdc, HDC* hdcSized, FORMATRANGE* lpFr, float r
/* Draw margin lines */
hPen
=
CreatePen
(
PS_DOT
,
1
,
RGB
(
0
,
0
,
0
));
SelectObject
(
*
hdcSized
,
hPen
);
oldPen
=
SelectObject
(
*
hdcSized
,
hPen
);
MoveToEx
(
*
hdcSized
,
0
,
TopMargin
,
NULL
);
LineTo
(
*
hdcSized
,
bmNewWidth
,
TopMargin
);
...
...
@@ -872,6 +875,8 @@ static void draw_preview_page(HDC hdc, HDC* hdcSized, FORMATRANGE* lpFr, float r
MoveToEx
(
*
hdcSized
,
RightMargin
,
0
,
NULL
);
LineTo
(
*
hdcSized
,
RightMargin
,
bmNewHeight
);
SelectObject
(
*
hdcSized
,
oldPen
);
DeleteObject
(
hPen
);
}
static
void
draw_preview
(
HWND
hEditorWnd
,
FORMATRANGE
*
lpFr
,
RECT
*
paper
,
int
page
)
...
...
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