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
d415df99
Commit
d415df99
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_MDICREATE.
parent
bba01599
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
34 deletions
+37
-34
winproc.c
dlls/user/winproc.c
+37
-34
No files found.
dlls/user/winproc.c
View file @
d415df99
...
...
@@ -992,29 +992,6 @@ static INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
{
switch
(
msg
)
{
case
WM_MDICREATE
:
{
MDICREATESTRUCTA
*
cs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
cs
)
);
if
(
!
cs
)
return
-
1
;
*
cs
=
*
(
MDICREATESTRUCTA
*
)
*
plparam
;
if
(
HIWORD
(
cs
->
szTitle
))
{
int
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
cs
->
szTitle
,
-
1
,
NULL
,
0
,
0
,
0
);
LPSTR
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
buf
)
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
cs
->
szTitle
,
-
1
,
buf
,
len
,
0
,
0
);
cs
->
szTitle
=
buf
;
}
if
(
HIWORD
(
cs
->
szClass
))
{
int
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
cs
->
szClass
,
-
1
,
NULL
,
0
,
0
,
0
);
LPSTR
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
buf
)
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
cs
->
szClass
,
-
1
,
buf
,
len
,
0
,
0
);
cs
->
szClass
=
buf
;
}
*
plparam
=
(
LPARAM
)
cs
;
}
return
1
;
/* Listbox */
case
LB_ADDSTRING
:
case
LB_INSERTSTRING
:
...
...
@@ -1124,17 +1101,6 @@ static LRESULT WINPROC_UnmapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM wParam, LPA
{
switch
(
msg
)
{
case
WM_MDICREATE
:
{
MDICREATESTRUCTA
*
cs
=
(
MDICREATESTRUCTA
*
)
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
;
/* Listbox */
case
LB_ADDSTRING
:
case
LB_INSERTSTRING
:
...
...
@@ -3053,6 +3019,43 @@ static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd, UINT msg, WPAR
}
break
;
case
WM_MDICREATE
:
{
char
*
ptr
,
buffer
[
1024
];
DWORD
title_lenA
=
0
,
title_lenW
=
0
,
class_lenA
=
0
,
class_lenW
=
0
;
MDICREATESTRUCTW
*
csW
=
(
MDICREATESTRUCTW
*
)
lParam
;
MDICREATESTRUCTA
csA
;
memcpy
(
&
csA
,
csW
,
sizeof
(
csA
)
);
if
(
HIWORD
(
csW
->
szTitle
))
{
title_lenW
=
(
strlenW
(
csW
->
szTitle
)
+
1
)
*
sizeof
(
WCHAR
);
RtlUnicodeToMultiByteSize
(
&
title_lenA
,
csW
->
szTitle
,
title_lenW
);
}
if
(
HIWORD
(
csW
->
szClass
))
{
class_lenW
=
(
strlenW
(
csW
->
szClass
)
+
1
)
*
sizeof
(
WCHAR
);
RtlUnicodeToMultiByteSize
(
&
class_lenA
,
csW
->
szClass
,
class_lenW
);
}
if
(
!
(
ptr
=
get_buffer
(
buffer
,
sizeof
(
buffer
),
title_lenA
+
class_lenA
)))
break
;
if
(
title_lenA
)
{
RtlUnicodeToMultiByteN
(
ptr
,
title_lenA
,
NULL
,
csW
->
szTitle
,
title_lenW
);
csA
.
szTitle
=
ptr
;
}
if
(
class_lenA
)
{
RtlUnicodeToMultiByteN
(
ptr
+
title_lenA
,
class_lenA
,
NULL
,
csW
->
szClass
,
class_lenW
);
csA
.
szClass
=
ptr
+
title_lenA
;
}
ret
=
WINPROC_CallWndProc
(
func
,
hwnd
,
msg
,
wParam
,
(
LPARAM
)
&
csA
);
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