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
34b7b3f7
Commit
34b7b3f7
authored
Apr 06, 2000
by
Junichi Kuchinishi
Committed by
Alexandre Julliard
Apr 06, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added conversion from DBCS lpDx to WCHAR lpDx.
parent
6a4e8a5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
+30
-4
text.c
objects/text.c
+30
-4
No files found.
objects/text.c
View file @
34b7b3f7
...
...
@@ -319,8 +319,16 @@ INT WINAPI DrawTextA( HDC hdc, LPCSTR str, INT count,
INT
WINAPI
DrawTextW
(
HDC
hdc
,
LPCWSTR
str
,
INT
count
,
LPRECT
rect
,
UINT
flags
)
{
LPSTR
p
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
str
);
INT
ret
=
DrawTextA
(
hdc
,
p
,
count
,
rect
,
flags
);
LPSTR
p
;
INT
acount
;
INT
ret
;
UINT
codepage
=
CP_ACP
;
/* FIXME: get codepage of font charset */
acount
=
WideCharToMultiByte
(
codepage
,
0
,
str
,
count
,
NULL
,
0
,
NULL
,
NULL
);
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
acount
);
acount
=
WideCharToMultiByte
(
codepage
,
0
,
str
,
count
,
p
,
acount
,
NULL
,
NULL
);
ret
=
DrawTextA
(
hdc
,
p
,
acount
,
rect
,
flags
);
HeapFree
(
GetProcessHeap
(),
0
,
p
);
return
ret
;
}
...
...
@@ -386,12 +394,30 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
INT
ret
;
UINT
codepage
=
CP_ACP
;
/* FIXME: get codepage of font charset */
UINT
wlen
;
LPINT
lpDxW
=
NULL
;
wlen
=
MultiByteToWideChar
(
codepage
,
0
,
str
,
count
,
NULL
,
0
);
if
(
lpDx
){
int
i
,
j
;
i
=
0
;
j
=
0
;
lpDxW
=
(
LPINT
)
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
*
sizeof
(
INT
));
while
(
i
<
count
){
if
(
IsDBCSLeadByteEx
(
codepage
,
str
[
i
])){
lpDxW
[
j
++
]
=
lpDx
[
i
]
+
lpDx
[
i
+
1
];
i
=
i
+
2
;
}
else
{
lpDxW
[
j
++
]
=
lpDx
[
i
];
i
=
i
+
1
;
}
}
lpDx
=
lpDxW
;
}
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
wlen
*
sizeof
(
WCHAR
)
);
wlen
=
MultiByteToWideChar
(
codepage
,
0
,
str
,
count
,
p
,
wlen
);
ret
=
ExtTextOutW
(
hdc
,
x
,
y
,
flags
,
lprect
,
p
,
wlen
,
lpDx
);
ret
=
ExtTextOutW
(
hdc
,
x
,
y
,
flags
,
lprect
,
p
,
wlen
,
lpDxW
);
if
(
lpDxW
)
HeapFree
(
GetProcessHeap
(),
0
,
lpDxW
);
HeapFree
(
GetProcessHeap
(),
0
,
p
);
return
ret
;
}
...
...
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