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
2b77fed4
Commit
2b77fed4
authored
Nov 06, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fixed A<->W translations of CREATESTRUCTs that contain atoms.
parent
b3f7a556
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
23 deletions
+21
-23
winproc.c
dlls/user32/winproc.c
+21
-23
No files found.
dlls/user32/winproc.c
View file @
2b77fed4
...
@@ -778,12 +778,12 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
...
@@ -778,12 +778,12 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
MDICREATESTRUCTW
mdi_cs
;
MDICREATESTRUCTW
mdi_cs
;
DWORD
name_lenA
=
0
,
name_lenW
=
0
,
class_lenA
=
0
,
class_lenW
=
0
;
DWORD
name_lenA
=
0
,
name_lenW
=
0
,
class_lenA
=
0
,
class_lenW
=
0
;
if
(
HIWORD
(
csA
->
lpszClass
))
if
(
!
IS_INTRESOURCE
(
csA
->
lpszClass
))
{
{
class_lenA
=
strlen
(
csA
->
lpszClass
)
+
1
;
class_lenA
=
strlen
(
csA
->
lpszClass
)
+
1
;
RtlMultiByteToUnicodeSize
(
&
class_lenW
,
csA
->
lpszClass
,
class_lenA
);
RtlMultiByteToUnicodeSize
(
&
class_lenW
,
csA
->
lpszClass
,
class_lenA
);
}
}
if
(
HIWORD
(
csA
->
lpszName
))
if
(
!
IS_INTRESOURCE
(
csA
->
lpszName
))
{
{
name_lenA
=
strlen
(
csA
->
lpszName
)
+
1
;
name_lenA
=
strlen
(
csA
->
lpszName
)
+
1
;
RtlMultiByteToUnicodeSize
(
&
name_lenW
,
csA
->
lpszName
,
name_lenA
);
RtlMultiByteToUnicodeSize
(
&
name_lenW
,
csA
->
lpszName
,
name_lenA
);
...
@@ -825,12 +825,12 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
...
@@ -825,12 +825,12 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
memcpy
(
&
csW
,
csA
,
sizeof
(
csW
)
);
memcpy
(
&
csW
,
csA
,
sizeof
(
csW
)
);
if
(
HIWORD
(
csA
->
szTitle
))
if
(
!
IS_INTRESOURCE
(
csA
->
szTitle
))
{
{
title_lenA
=
strlen
(
csA
->
szTitle
)
+
1
;
title_lenA
=
strlen
(
csA
->
szTitle
)
+
1
;
RtlMultiByteToUnicodeSize
(
&
title_lenW
,
csA
->
szTitle
,
title_lenA
);
RtlMultiByteToUnicodeSize
(
&
title_lenW
,
csA
->
szTitle
,
title_lenA
);
}
}
if
(
HIWORD
(
csA
->
szClass
))
if
(
!
IS_INTRESOURCE
(
csA
->
szClass
))
{
{
class_lenA
=
strlen
(
csA
->
szClass
)
+
1
;
class_lenA
=
strlen
(
csA
->
szClass
)
+
1
;
RtlMultiByteToUnicodeSize
(
&
class_lenW
,
csA
->
szClass
,
class_lenA
);
RtlMultiByteToUnicodeSize
(
&
class_lenW
,
csA
->
szClass
,
class_lenA
);
...
@@ -1032,37 +1032,35 @@ static LRESULT WINPROC_CallProcWtoA( winproc_callback_t callback, HWND hwnd, UIN
...
@@ -1032,37 +1032,35 @@ static LRESULT WINPROC_CallProcWtoA( winproc_callback_t callback, HWND hwnd, UIN
{
{
case
WM_NCCREATE
:
case
WM_NCCREATE
:
case
WM_CREATE
:
case
WM_CREATE
:
{
/* csW->lpszName and csW->lpszClass are NOT supposed to be atoms
{
* at this point.
char
buffer
[
1024
],
*
cls
;
*/
char
buffer
[
1024
],
*
cls
,
*
name
;
CREATESTRUCTW
*
csW
=
(
CREATESTRUCTW
*
)
lParam
;
CREATESTRUCTW
*
csW
=
(
CREATESTRUCTW
*
)
lParam
;
CREATESTRUCTA
csA
=
*
(
CREATESTRUCTA
*
)
csW
;
CREATESTRUCTA
csA
=
*
(
CREATESTRUCTA
*
)
csW
;
MDICREATESTRUCTA
mdi_cs
;
MDICREATESTRUCTA
mdi_cs
;
DWORD
name_lenA
,
name_lenW
,
class_lenA
,
class_lenW
;
DWORD
name_lenA
=
0
,
name_lenW
=
0
,
class_lenA
=
0
,
class_lenW
=
0
;
class_lenW
=
strlenW
(
csW
->
lpszClass
)
*
sizeof
(
WCHAR
);
if
(
!
IS_INTRESOURCE
(
csW
->
lpszClass
))
{
class_lenW
=
(
strlenW
(
csW
->
lpszClass
)
+
1
)
*
sizeof
(
WCHAR
);
RtlUnicodeToMultiByteSize
(
&
class_lenA
,
csW
->
lpszClass
,
class_lenW
);
RtlUnicodeToMultiByteSize
(
&
class_lenA
,
csW
->
lpszClass
,
class_lenW
);
}
if
(
csW
->
lpszName
)
if
(
!
IS_INTRESOURCE
(
csW
->
lpszName
)
)
{
{
name_lenW
=
strlenW
(
csW
->
lpszName
)
*
sizeof
(
WCHAR
);
name_lenW
=
(
strlenW
(
csW
->
lpszName
)
+
1
)
*
sizeof
(
WCHAR
);
RtlUnicodeToMultiByteSize
(
&
name_lenA
,
csW
->
lpszName
,
name_lenW
);
RtlUnicodeToMultiByteSize
(
&
name_lenA
,
csW
->
lpszName
,
name_lenW
);
}
}
else
name_lenW
=
name_lenA
=
0
;
if
(
!
(
cls
=
get_buffer
(
buffer
,
sizeof
(
buffer
),
class_lenA
+
name_lenA
+
2
)))
break
;
if
(
!
(
cls
=
get_buffer
(
buffer
,
sizeof
(
buffer
),
class_lenA
+
name_lenA
)))
break
;
if
(
class_lenA
)
{
RtlUnicodeToMultiByteN
(
cls
,
class_lenA
,
NULL
,
csW
->
lpszClass
,
class_lenW
);
RtlUnicodeToMultiByteN
(
cls
,
class_lenA
,
NULL
,
csW
->
lpszClass
,
class_lenW
);
cls
[
class_lenA
]
=
0
;
csA
.
lpszClass
=
cls
;
csA
.
lpszClass
=
cls
;
}
if
(
csW
->
lpszName
)
if
(
name_lenA
)
{
{
name
=
cls
+
class_lenA
+
1
;
char
*
name
=
cls
+
class_lenA
;
RtlUnicodeToMultiByteN
(
name
,
name_lenA
,
NULL
,
csW
->
lpszName
,
name_lenW
);
RtlUnicodeToMultiByteN
(
name
,
name_lenA
,
NULL
,
csW
->
lpszName
,
name_lenW
);
name
[
name_lenA
]
=
0
;
csA
.
lpszName
=
name
;
csA
.
lpszName
=
name
;
}
}
...
@@ -1149,12 +1147,12 @@ static LRESULT WINPROC_CallProcWtoA( winproc_callback_t callback, HWND hwnd, UIN
...
@@ -1149,12 +1147,12 @@ static LRESULT WINPROC_CallProcWtoA( winproc_callback_t callback, HWND hwnd, UIN
memcpy
(
&
csA
,
csW
,
sizeof
(
csA
)
);
memcpy
(
&
csA
,
csW
,
sizeof
(
csA
)
);
if
(
HIWORD
(
csW
->
szTitle
))
if
(
!
IS_INTRESOURCE
(
csW
->
szTitle
))
{
{
title_lenW
=
(
strlenW
(
csW
->
szTitle
)
+
1
)
*
sizeof
(
WCHAR
);
title_lenW
=
(
strlenW
(
csW
->
szTitle
)
+
1
)
*
sizeof
(
WCHAR
);
RtlUnicodeToMultiByteSize
(
&
title_lenA
,
csW
->
szTitle
,
title_lenW
);
RtlUnicodeToMultiByteSize
(
&
title_lenA
,
csW
->
szTitle
,
title_lenW
);
}
}
if
(
HIWORD
(
csW
->
szClass
))
if
(
!
IS_INTRESOURCE
(
csW
->
szClass
))
{
{
class_lenW
=
(
strlenW
(
csW
->
szClass
)
+
1
)
*
sizeof
(
WCHAR
);
class_lenW
=
(
strlenW
(
csW
->
szClass
)
+
1
)
*
sizeof
(
WCHAR
);
RtlUnicodeToMultiByteSize
(
&
class_lenA
,
csW
->
szClass
,
class_lenW
);
RtlUnicodeToMultiByteSize
(
&
class_lenA
,
csW
->
szClass
,
class_lenW
);
...
...
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