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
4dd1cce2
Commit
4dd1cce2
authored
May 20, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Added fast A->W mapping for WM_SETTEXT and related messages.
parent
91b278b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
35 deletions
+40
-35
winproc.c
dlls/user/winproc.c
+40
-35
No files found.
dlls/user/winproc.c
View file @
4dd1cce2
...
...
@@ -775,26 +775,6 @@ static INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
case
LB_GETTEXTLEN
:
return
1
;
/* need to map result */
/* Listbox / Combobox */
case
LB_ADDSTRING
:
case
LB_INSERTSTRING
:
case
LB_FINDSTRING
:
case
LB_FINDSTRINGEXACT
:
case
LB_SELECTSTRING
:
case
CB_ADDSTRING
:
case
CB_INSERTSTRING
:
case
CB_FINDSTRINGEXACT
:
case
CB_FINDSTRING
:
case
CB_SELECTSTRING
:
if
(
!*
plparam
)
return
0
;
if
(
WINPROC_TestLBForStr
(
hwnd
,
msg
))
{
UNICODE_STRING
usBuffer
;
RtlCreateUnicodeStringFromAsciiz
(
&
usBuffer
,(
LPCSTR
)
*
plparam
);
*
plparam
=
(
LPARAM
)
usBuffer
.
Buffer
;
}
return
(
*
plparam
?
1
:
-
1
);
case
LB_GETTEXT
:
/* FIXME: fixed sized buffer */
case
CB_GETLBTEXT
:
if
(
WINPROC_TestLBForStr
(
hwnd
,
msg
))
...
...
@@ -905,21 +885,6 @@ static LRESULT WINPROC_UnmapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM wParam, LPA
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
lParam
);
break
;
/* Listbox / Combobox */
case
LB_ADDSTRING
:
case
LB_INSERTSTRING
:
case
LB_FINDSTRING
:
case
LB_FINDSTRINGEXACT
:
case
LB_SELECTSTRING
:
case
CB_ADDSTRING
:
case
CB_INSERTSTRING
:
case
CB_FINDSTRING
:
case
CB_FINDSTRINGEXACT
:
case
CB_SELECTSTRING
:
if
(
WINPROC_TestLBForStr
(
hwnd
,
msg
))
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
lParam
);
break
;
case
LB_GETTEXT
:
case
CB_GETLBTEXT
:
if
(
WINPROC_TestLBForStr
(
hwnd
,
msg
))
...
...
@@ -2708,6 +2673,46 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
}
break
;
case
LB_ADDSTRING
:
case
LB_INSERTSTRING
:
case
LB_FINDSTRING
:
case
LB_FINDSTRINGEXACT
:
case
LB_SELECTSTRING
:
case
CB_ADDSTRING
:
case
CB_INSERTSTRING
:
case
CB_FINDSTRING
:
case
CB_FINDSTRINGEXACT
:
case
CB_SELECTSTRING
:
if
(
!
lParam
||
!
WINPROC_TestLBForStr
(
hwnd
,
msg
))
{
ret
=
callback
(
hwnd
,
msg
,
wParam
,
lParam
,
result
,
arg
);
break
;
}
/* fall through */
case
WM_SETTEXT
:
case
WM_WININICHANGE
:
case
WM_DEVMODECHANGE
:
case
CB_DIR
:
case
LB_DIR
:
case
LB_ADDFILE
:
case
EM_REPLACESEL
:
if
(
!
lParam
)
ret
=
callback
(
hwnd
,
msg
,
wParam
,
lParam
,
result
,
arg
);
else
{
WCHAR
*
ptr
,
buffer
[
512
];
LPCSTR
strA
=
(
LPCSTR
)
lParam
;
DWORD
lenW
,
lenA
=
strlen
(
strA
)
+
1
;
RtlMultiByteToUnicodeSize
(
&
lenW
,
strA
,
lenA
);
if
((
ptr
=
get_buffer
(
buffer
,
sizeof
(
buffer
),
lenW
)))
{
RtlMultiByteToUnicodeN
(
ptr
,
lenW
,
NULL
,
strA
,
lenA
);
ret
=
callback
(
hwnd
,
msg
,
wParam
,
(
LPARAM
)
ptr
,
result
,
arg
);
free_buffer
(
buffer
,
ptr
);
}
}
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