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
3e195d43
Commit
3e195d43
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_MDICREATE.
parent
899133d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
31 deletions
+38
-31
winproc.c
dlls/user/winproc.c
+38
-31
No files found.
dlls/user/winproc.c
View file @
3e195d43
...
...
@@ -774,26 +774,6 @@ static INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
case
CB_GETLBTEXTLEN
:
case
LB_GETTEXTLEN
:
return
1
;
/* need to map result */
case
WM_MDICREATE
:
{
MDICREATESTRUCTW
*
cs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
cs
)
);
if
(
!
cs
)
return
-
1
;
*
cs
=
*
(
MDICREATESTRUCTW
*
)
*
plparam
;
if
(
HIWORD
(
cs
->
szClass
))
{
UNICODE_STRING
usBuffer
;
RtlCreateUnicodeStringFromAsciiz
(
&
usBuffer
,(
LPCSTR
)
cs
->
szClass
);
cs
->
szClass
=
usBuffer
.
Buffer
;
}
if
(
HIWORD
(
cs
->
szTitle
))
{
UNICODE_STRING
usBuffer
;
RtlCreateUnicodeStringFromAsciiz
(
&
usBuffer
,(
LPCSTR
)
cs
->
szTitle
);
cs
->
szTitle
=
usBuffer
.
Buffer
;
}
*
plparam
=
(
LPARAM
)
cs
;
}
return
1
;
/* Listbox / Combobox */
case
LB_ADDSTRING
:
...
...
@@ -915,17 +895,6 @@ static LRESULT WINPROC_UnmapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM wParam, LPA
}
break
;
case
WM_MDICREATE
:
{
MDICREATESTRUCTW
*
cs
=
(
MDICREATESTRUCTW
*
)
lParam
;
if
(
HIWORD
(
cs
->
szTitle
))
HeapFree
(
GetProcessHeap
(),
0
,
(
LPVOID
)
cs
->
szTitle
);
if
(
HIWORD
(
cs
->
szClass
))
HeapFree
(
GetProcessHeap
(),
0
,
(
LPVOID
)
cs
->
szClass
);
HeapFree
(
GetProcessHeap
(),
0
,
cs
);
}
break
;
case
WM_SETTEXT
:
case
WM_WININICHANGE
:
case
WM_DEVMODECHANGE
:
...
...
@@ -2682,6 +2651,44 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
}
break
;
case
WM_MDICREATE
:
{
WCHAR
*
ptr
,
buffer
[
512
];
DWORD
title_lenA
=
0
,
title_lenW
=
0
,
class_lenA
=
0
,
class_lenW
=
0
;
MDICREATESTRUCTA
*
csA
=
(
MDICREATESTRUCTA
*
)
lParam
;
MDICREATESTRUCTW
csW
;
memcpy
(
&
csW
,
csA
,
sizeof
(
csW
)
);
if
(
HIWORD
(
csA
->
szTitle
))
{
title_lenA
=
strlen
(
csA
->
szTitle
)
+
1
;
RtlMultiByteToUnicodeSize
(
&
title_lenW
,
csA
->
szTitle
,
title_lenA
);
}
if
(
HIWORD
(
csA
->
szClass
))
{
class_lenA
=
strlen
(
csA
->
szClass
)
+
1
;
RtlMultiByteToUnicodeSize
(
&
class_lenW
,
csA
->
szClass
,
class_lenA
);
}
if
(
!
(
ptr
=
get_buffer
(
buffer
,
sizeof
(
buffer
),
title_lenW
+
class_lenW
)))
break
;
if
(
title_lenW
)
{
csW
.
szTitle
=
ptr
;
RtlMultiByteToUnicodeN
(
ptr
,
title_lenW
,
NULL
,
csA
->
szTitle
,
title_lenA
);
}
if
(
class_lenW
)
{
csW
.
szClass
=
ptr
+
title_lenW
/
sizeof
(
WCHAR
);
RtlMultiByteToUnicodeN
(
ptr
+
title_lenW
/
sizeof
(
WCHAR
),
class_lenW
,
NULL
,
csA
->
szClass
,
class_lenA
);
}
ret
=
callback
(
hwnd
,
msg
,
wParam
,
(
LPARAM
)
&
csW
,
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