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
f793b818
Commit
f793b818
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_GETTEXT and WM_ASKCBFORNAME.
parent
cb36cbd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
26 deletions
+23
-26
winproc.c
dlls/user/winproc.c
+23
-26
No files found.
dlls/user/winproc.c
View file @
f793b818
...
...
@@ -992,16 +992,6 @@ static INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
{
switch
(
msg
)
{
case
WM_GETTEXT
:
case
WM_ASKCBFORMATNAME
:
{
LPARAM
*
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
pwparam
+
sizeof
(
LPARAM
)
);
if
(
!
ptr
)
return
-
1
;
*
ptr
++
=
*
plparam
;
/* Store previous lParam */
*
plparam
=
(
LPARAM
)
ptr
;
}
return
1
;
case
WM_SETTEXT
:
case
WM_WININICHANGE
:
case
WM_DEVMODECHANGE
:
...
...
@@ -1152,22 +1142,6 @@ static LRESULT WINPROC_UnmapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPA
{
switch
(
msg
)
{
case
WM_GETTEXT
:
case
WM_ASKCBFORMATNAME
:
{
LPARAM
*
ptr
=
(
LPARAM
*
)
lParam
-
1
;
if
(
!
wParam
)
result
=
0
;
else
if
(
!
(
result
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
lParam
,
-
1
,
(
LPWSTR
)
*
ptr
,
wParam
)))
{
((
LPWSTR
)
*
ptr
)[
wParam
-
1
]
=
0
;
result
=
wParam
-
1
;
}
else
result
--
;
/* do not count terminating null */
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
}
break
;
case
WM_SETTEXT
:
case
WM_WININICHANGE
:
case
WM_DEVMODECHANGE
:
...
...
@@ -3060,6 +3034,29 @@ static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, UINT msg, WPAR
}
break
;
case
WM_GETTEXT
:
case
WM_ASKCBFORMATNAME
:
{
char
*
ptr
,
buffer
[
512
];
DWORD
len
=
wParam
*
2
;
if
(
!
(
ptr
=
get_buffer
(
buffer
,
sizeof
(
buffer
),
len
)))
break
;
ret
=
WINPROC_CallWndProc
(
func
,
hwnd
,
msg
,
len
,
(
LPARAM
)
ptr
);
if
(
ret
&&
len
)
{
RtlMultiByteToUnicodeN
(
(
LPWSTR
)
lParam
,
wParam
*
sizeof
(
WCHAR
),
&
len
,
ptr
,
strlen
(
ptr
)
+
1
);
ret
=
len
/
sizeof
(
WCHAR
)
-
1
;
/* do not count terminating null */
((
LPWSTR
)
lParam
)[
ret
]
=
0
;
if
(
dialog
)
{
SetWindowLongPtrW
(
hwnd
,
DWLP_MSGRESULT
,
ret
);
ret
=
TRUE
;
}
}
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