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
96a430f5
Commit
96a430f5
authored
May 18, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Added fast W->A mapping for LB_ADDSTRING and related messages.
parent
d415df99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
48 deletions
+21
-48
winproc.c
dlls/user/winproc.c
+21
-48
No files found.
dlls/user/winproc.c
View file @
96a430f5
...
@@ -993,21 +993,6 @@ static INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
...
@@ -993,21 +993,6 @@ static INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
switch
(
msg
)
switch
(
msg
)
{
{
/* Listbox */
/* Listbox */
case
LB_ADDSTRING
:
case
LB_INSERTSTRING
:
case
LB_FINDSTRING
:
case
LB_FINDSTRINGEXACT
:
case
LB_SELECTSTRING
:
if
(
!*
plparam
)
return
0
;
if
(
WINPROC_TestLBForStr
(
hwnd
))
{
int
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
*
plparam
,
-
1
,
NULL
,
0
,
0
,
0
);
LPSTR
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
buf
)
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
*
plparam
,
-
1
,
buf
,
len
,
0
,
0
);
*
plparam
=
(
LPARAM
)
buf
;
}
return
(
*
plparam
?
1
:
-
1
);
case
LB_GETTEXT
:
/* FIXME: fixed sized buffer */
case
LB_GETTEXT
:
/* FIXME: fixed sized buffer */
{
if
(
WINPROC_TestLBForStr
(
hwnd
))
{
if
(
WINPROC_TestLBForStr
(
hwnd
))
{
LPARAM
*
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
512
+
sizeof
(
LPARAM
)
);
{
LPARAM
*
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
512
+
sizeof
(
LPARAM
)
);
...
@@ -1019,21 +1004,6 @@ static INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
...
@@ -1019,21 +1004,6 @@ static INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
return
1
;
return
1
;
/* Combobox */
/* Combobox */
case
CB_ADDSTRING
:
case
CB_INSERTSTRING
:
case
CB_FINDSTRING
:
case
CB_FINDSTRINGEXACT
:
case
CB_SELECTSTRING
:
if
(
!*
plparam
)
return
0
;
if
(
WINPROC_TestCBForStr
(
hwnd
))
{
int
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
*
plparam
,
-
1
,
NULL
,
0
,
0
,
0
);
LPSTR
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
buf
)
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
*
plparam
,
-
1
,
buf
,
len
,
0
,
0
);
*
plparam
=
(
LPARAM
)
buf
;
}
return
(
*
plparam
?
1
:
-
1
);
case
CB_GETLBTEXT
:
/* FIXME: fixed sized buffer */
case
CB_GETLBTEXT
:
/* FIXME: fixed sized buffer */
{
if
(
WINPROC_TestCBForStr
(
hwnd
))
{
if
(
WINPROC_TestCBForStr
(
hwnd
))
{
LPARAM
*
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
512
+
sizeof
(
LPARAM
)
);
{
LPARAM
*
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
512
+
sizeof
(
LPARAM
)
);
...
@@ -1102,15 +1072,6 @@ static LRESULT WINPROC_UnmapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPA
...
@@ -1102,15 +1072,6 @@ static LRESULT WINPROC_UnmapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPA
switch
(
msg
)
switch
(
msg
)
{
{
/* Listbox */
/* Listbox */
case
LB_ADDSTRING
:
case
LB_INSERTSTRING
:
case
LB_FINDSTRING
:
case
LB_FINDSTRINGEXACT
:
case
LB_SELECTSTRING
:
if
(
WINPROC_TestLBForStr
(
hwnd
))
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
lParam
);
break
;
case
LB_GETTEXT
:
case
LB_GETTEXT
:
if
(
WINPROC_TestLBForStr
(
hwnd
))
if
(
WINPROC_TestLBForStr
(
hwnd
))
{
{
...
@@ -1122,15 +1083,6 @@ static LRESULT WINPROC_UnmapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPA
...
@@ -1122,15 +1083,6 @@ static LRESULT WINPROC_UnmapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPA
break
;
break
;
/* Combobox */
/* Combobox */
case
CB_ADDSTRING
:
case
CB_INSERTSTRING
:
case
CB_FINDSTRING
:
case
CB_FINDSTRINGEXACT
:
case
CB_SELECTSTRING
:
if
(
WINPROC_TestCBForStr
(
hwnd
))
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
lParam
);
break
;
case
CB_GETLBTEXT
:
case
CB_GETLBTEXT
:
if
(
result
<
0
)
/* CB_ERR and CB_ERRSPACE */
if
(
result
<
0
)
/* CB_ERR and CB_ERRSPACE */
{
{
...
@@ -3002,6 +2954,7 @@ static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, UINT msg, WPAR
...
@@ -3002,6 +2954,7 @@ static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, UINT msg, WPAR
case
LB_DIR
:
case
LB_DIR
:
case
LB_ADDFILE
:
case
LB_ADDFILE
:
case
EM_REPLACESEL
:
case
EM_REPLACESEL
:
handle_wm_settext:
if
(
!
lParam
)
ret
=
WINPROC_CallWndProc
(
func
,
hwnd
,
msg
,
wParam
,
lParam
);
if
(
!
lParam
)
ret
=
WINPROC_CallWndProc
(
func
,
hwnd
,
msg
,
wParam
,
lParam
);
else
else
{
{
...
@@ -3056,6 +3009,26 @@ static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, UINT msg, WPAR
...
@@ -3056,6 +3009,26 @@ static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, UINT msg, WPAR
}
}
break
;
break
;
/* Listbox */
case
LB_ADDSTRING
:
case
LB_INSERTSTRING
:
case
LB_FINDSTRING
:
case
LB_FINDSTRINGEXACT
:
case
LB_SELECTSTRING
:
if
(
lParam
&&
WINPROC_TestLBForStr
(
hwnd
))
goto
handle_wm_settext
;
ret
=
WINPROC_CallWndProc
(
func
,
hwnd
,
msg
,
wParam
,
lParam
);
break
;
/* Combobox */
case
CB_ADDSTRING
:
case
CB_INSERTSTRING
:
case
CB_FINDSTRING
:
case
CB_FINDSTRINGEXACT
:
case
CB_SELECTSTRING
:
if
(
lParam
&&
WINPROC_TestCBForStr
(
hwnd
))
goto
handle_wm_settext
;
ret
=
WINPROC_CallWndProc
(
func
,
hwnd
,
msg
,
wParam
,
lParam
);
break
;
default:
default:
if
((
unmap
=
WINPROC_MapMsg32WTo32A
(
hwnd
,
msg
,
&
wParam
,
&
lParam
))
==
-
1
)
{
if
((
unmap
=
WINPROC_MapMsg32WTo32A
(
hwnd
,
msg
,
&
wParam
,
&
lParam
))
==
-
1
)
{
ERR_
(
msg
)(
"Message translation failed. (msg=%s,wp=%08x,lp=%08lx)
\n
"
,
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