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
b5ee7aee
Commit
b5ee7aee
authored
Mar 26, 2007
by
Marcin Grześkowiak
Committed by
Alexandre Julliard
Mar 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use charset of currently selected font in DrawTextExA.
parent
09e7791c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
text.c
dlls/user32/text.c
+5
-3
No files found.
dlls/user32/text.c
View file @
b5ee7aee
...
...
@@ -1030,6 +1030,7 @@ INT WINAPI DrawTextExA( HDC hdc, LPSTR str, INT count,
DWORD
wcount
;
DWORD
wmax
;
DWORD
amax
;
UINT
cp
;
if
(
!
count
)
return
0
;
if
(
!
str
||
((
count
==
-
1
)
&&
!
(
count
=
strlen
(
str
))))
...
...
@@ -1041,7 +1042,8 @@ INT WINAPI DrawTextExA( HDC hdc, LPSTR str, INT count,
}
return
0
;
}
wcount
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
count
,
NULL
,
0
);
cp
=
GdiGetCodePage
(
hdc
);
wcount
=
MultiByteToWideChar
(
cp
,
0
,
str
,
count
,
NULL
,
0
);
wmax
=
wcount
;
amax
=
count
;
if
(
flags
&
DT_MODIFYSTRING
)
...
...
@@ -1052,7 +1054,7 @@ INT WINAPI DrawTextExA( HDC hdc, LPSTR str, INT count,
wstr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wmax
*
sizeof
(
WCHAR
));
if
(
wstr
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
count
,
wstr
,
wcount
);
MultiByteToWideChar
(
cp
,
0
,
str
,
count
,
wstr
,
wcount
);
if
(
flags
&
DT_MODIFYSTRING
)
for
(
i
=
4
,
p
=
wstr
+
wcount
;
i
--
;
p
++
)
*
p
=
0xFFFE
;
/* Initialise the extra characters so that we can see which ones
...
...
@@ -1066,7 +1068,7 @@ INT WINAPI DrawTextExA( HDC hdc, LPSTR str, INT count,
* and so we need to measure it ourselves.
*/
for
(
i
=
4
,
p
=
wstr
+
wcount
;
i
--
&&
*
p
!=
0xFFFE
;
p
++
)
wcount
++
;
WideCharToMultiByte
(
CP_ACP
,
0
,
wstr
,
wcount
,
str
,
amax
,
NULL
,
NULL
);
WideCharToMultiByte
(
cp
,
0
,
wstr
,
wcount
,
str
,
amax
,
NULL
,
NULL
);
}
HeapFree
(
GetProcessHeap
(),
0
,
wstr
);
}
...
...
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