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
19b42875
Commit
19b42875
authored
May 20, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Added fast A->W mapping for LB_GETTEXT and CB_GETLBTEXT.
parent
4dd1cce2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
23 deletions
+18
-23
winproc.c
dlls/user/winproc.c
+18
-23
No files found.
dlls/user/winproc.c
View file @
19b42875
...
...
@@ -775,17 +775,6 @@ static INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
case
LB_GETTEXTLEN
:
return
1
;
/* need to map result */
case
LB_GETTEXT
:
/* FIXME: fixed sized buffer */
case
CB_GETLBTEXT
:
if
(
WINPROC_TestLBForStr
(
hwnd
,
msg
))
{
LPARAM
*
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
512
*
sizeof
(
WCHAR
)
+
sizeof
(
LPARAM
)
);
if
(
!
ptr
)
return
-
1
;
*
ptr
++
=
*
plparam
;
/* Store previous lParam */
*
plparam
=
(
LPARAM
)
ptr
;
}
return
1
;
/* Multiline edit */
case
EM_GETLINE
:
{
WORD
len
=
(
WORD
)
*
plparam
;
...
...
@@ -885,18 +874,6 @@ static LRESULT WINPROC_UnmapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM wParam, LPA
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
lParam
);
break
;
case
LB_GETTEXT
:
case
CB_GETLBTEXT
:
if
(
WINPROC_TestLBForStr
(
hwnd
,
msg
))
{
LPARAM
*
ptr
=
(
LPARAM
*
)
lParam
-
1
;
if
(
result
>=
0
)
result
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPWSTR
)
lParam
,
-
1
,
(
LPSTR
)
*
ptr
,
0x7fffffff
,
NULL
,
NULL
)
-
1
;
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
}
break
;
/* Multiline edit */
case
EM_GETLINE
:
{
...
...
@@ -2713,6 +2690,24 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
}
break
;
case
LB_GETTEXT
:
case
CB_GETLBTEXT
:
if
(
lParam
&&
WINPROC_TestLBForStr
(
hwnd
,
msg
))
{
WCHAR
buffer
[
512
];
/* FIXME: fixed sized buffer */
ret
=
callback
(
hwnd
,
msg
,
wParam
,
(
LPARAM
)
buffer
,
result
,
arg
);
if
(
*
result
>=
0
)
{
DWORD
len
;
RtlUnicodeToMultiByteN
(
(
LPSTR
)
lParam
,
~
0u
,
&
len
,
buffer
,
(
strlenW
(
buffer
)
+
1
)
*
sizeof
(
WCHAR
)
);
*
result
=
len
-
1
;
}
}
else
ret
=
callback
(
hwnd
,
msg
,
wParam
,
lParam
,
result
,
arg
);
break
;
default:
if
(
(
unmap
=
WINPROC_MapMsg32ATo32W
(
hwnd
,
msg
,
&
wParam
,
&
lParam
))
==
-
1
)
{
ERR_
(
msg
)(
"Message translation failed. (msg=%s,wp=%08x,lp=%08lx)
\n
"
,
...
...
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