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
bba01599
Commit
bba01599
authored
May 18, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Added fast W->A mapping for WM_SETTEXT and related messages.
parent
f793b818
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
28 deletions
+24
-28
winproc.c
dlls/user/winproc.c
+24
-28
No files found.
dlls/user/winproc.c
View file @
bba01599
...
...
@@ -992,24 +992,6 @@ static INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
{
switch
(
msg
)
{
case
WM_SETTEXT
:
case
WM_WININICHANGE
:
case
WM_DEVMODECHANGE
:
case
CB_DIR
:
case
LB_DIR
:
case
LB_ADDFILE
:
case
EM_REPLACESEL
:
if
(
*
plparam
)
{
LPCWSTR
str
=
(
LPCWSTR
)
*
plparam
;
int
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
,
0
,
0
);
*
plparam
=
(
LPARAM
)
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!*
plparam
)
return
-
1
;
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
(
LPSTR
)
*
plparam
,
len
,
0
,
0
);
return
1
;
}
return
0
;
case
WM_MDICREATE
:
{
MDICREATESTRUCTA
*
cs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
cs
)
);
...
...
@@ -1142,16 +1124,6 @@ static LRESULT WINPROC_UnmapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPA
{
switch
(
msg
)
{
case
WM_SETTEXT
:
case
WM_WININICHANGE
:
case
WM_DEVMODECHANGE
:
case
CB_DIR
:
case
LB_DIR
:
case
LB_ADDFILE
:
case
EM_REPLACESEL
:
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
lParam
);
break
;
case
WM_MDICREATE
:
{
MDICREATESTRUCTA
*
cs
=
(
MDICREATESTRUCTA
*
)
lParam
;
...
...
@@ -3057,6 +3029,30 @@ static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, UINT msg, WPAR
}
break
;
case
WM_SETTEXT
:
case
WM_WININICHANGE
:
case
WM_DEVMODECHANGE
:
case
CB_DIR
:
case
LB_DIR
:
case
LB_ADDFILE
:
case
EM_REPLACESEL
:
if
(
!
lParam
)
ret
=
WINPROC_CallWndProc
(
func
,
hwnd
,
msg
,
wParam
,
lParam
);
else
{
char
*
ptr
,
buffer
[
512
];
LPCWSTR
strW
=
(
LPCWSTR
)
lParam
;
DWORD
lenA
,
lenW
=
(
strlenW
(
strW
)
+
1
)
*
sizeof
(
WCHAR
);
RtlUnicodeToMultiByteSize
(
&
lenA
,
strW
,
lenW
);
if
((
ptr
=
get_buffer
(
buffer
,
sizeof
(
buffer
),
lenA
)))
{
RtlUnicodeToMultiByteN
(
ptr
,
lenA
,
NULL
,
strW
,
lenW
);
ret
=
WINPROC_CallWndProc
(
func
,
hwnd
,
msg
,
wParam
,
(
LPARAM
)
ptr
);
free_buffer
(
buffer
,
ptr
);
}
}
break
;
default:
if
((
unmap
=
WINPROC_MapMsg32WTo32A
(
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