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
5d9ab56d
Commit
5d9ab56d
authored
May 05, 2017
by
Huw Davies
Committed by
Alexandre Julliard
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Select the correct font before querying the extents.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e77771c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
itemdlg.c
dlls/comdlg32/itemdlg.c
+4
-0
No files found.
dlls/comdlg32/itemdlg.c
View file @
5d9ab56d
...
...
@@ -862,6 +862,7 @@ static void ctrl_resize(HWND hctrl, UINT min_width, UINT max_width, BOOL multili
RECT
rc
;
HDC
hdc
;
WCHAR
*
c
;
HFONT
font
;
TRACE
(
"
\n
"
);
...
...
@@ -871,7 +872,10 @@ static void ctrl_resize(HWND hctrl, UINT min_width, UINT max_width, BOOL multili
SendMessageW
(
hctrl
,
WM_GETTEXT
,
len
+
1
,
(
LPARAM
)
text
);
hdc
=
GetDC
(
hctrl
);
font
=
(
HFONT
)
SendMessageW
(
hctrl
,
WM_GETFONT
,
0
,
0
);
font
=
SelectObject
(
hdc
,
font
);
GetTextExtentPoint32W
(
hdc
,
text
,
lstrlenW
(
text
),
&
size
);
SelectObject
(
hdc
,
font
);
ReleaseDC
(
hctrl
,
hdc
);
if
(
len
&&
multiline
)
...
...
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