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
17c63bba
Commit
17c63bba
authored
May 11, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added A<->W mappings for WM_IME_CHAR.
parent
ba2ac133
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
17 deletions
+87
-17
message.c
dlls/user/message.c
+45
-17
winproc.c
windows/winproc.c
+42
-0
No files found.
dlls/user/message.c
View file @
17c63bba
...
...
@@ -187,7 +187,7 @@ static const unsigned int message_unicode_flags[] =
/* 0x260 - 0x27f */
0
,
/* 0x280 - 0x29f */
0
,
SET
(
WM_IME_CHAR
)
,
/* 0x2a0 - 0x2bf */
0
,
/* 0x2c0 - 0x2df */
...
...
@@ -325,19 +325,33 @@ static BOOL CALLBACK broadcast_message_callback( HWND hwnd, LPARAM lparam )
*/
static
WPARAM
map_wparam_AtoW
(
UINT
message
,
WPARAM
wparam
)
{
if
(
message
==
WM_CHARTOITEM
||
message
==
EM_SETPASSWORDCHAR
||
message
==
WM_CHAR
||
message
==
WM_DEADCHAR
||
message
==
WM_SYSCHAR
||
message
==
WM_SYSDEADCHAR
||
message
==
WM_MENUCHAR
)
switch
(
message
)
{
case
WM_CHARTOITEM
:
case
EM_SETPASSWORDCHAR
:
case
WM_CHAR
:
case
WM_DEADCHAR
:
case
WM_SYSCHAR
:
case
WM_SYSDEADCHAR
:
case
WM_MENUCHAR
:
{
char
ch
=
LOWORD
(
wparam
);
WCHAR
wch
;
MultiByteToWideChar
(
CP_ACP
,
0
,
&
ch
,
1
,
&
wch
,
1
);
wparam
=
MAKEWPARAM
(
wch
,
HIWORD
(
wparam
)
);
}
break
;
case
WM_IME_CHAR
:
{
char
ch
[
2
];
WCHAR
wch
;
ch
[
0
]
=
(
wparam
>>
8
);
ch
[
1
]
=
(
wparam
&
0xff
);
MultiByteToWideChar
(
CP_ACP
,
0
,
ch
,
2
,
&
wch
,
1
);
wparam
=
MAKEWPARAM
(
wch
,
HIWORD
(
wparam
)
);
}
break
;
}
return
wparam
;
}
...
...
@@ -349,18 +363,32 @@ static WPARAM map_wparam_AtoW( UINT message, WPARAM wparam )
*/
static
WPARAM
map_wparam_WtoA
(
UINT
message
,
WPARAM
wparam
)
{
if
(
message
==
WM_CHARTOITEM
||
message
==
EM_SETPASSWORDCHAR
||
message
==
WM_CHAR
||
message
==
WM_DEADCHAR
||
message
==
WM_SYSCHAR
||
message
==
WM_SYSDEADCHAR
||
message
==
WM_MENUCHAR
)
switch
(
message
)
{
case
WM_CHARTOITEM
:
case
EM_SETPASSWORDCHAR
:
case
WM_CHAR
:
case
WM_DEADCHAR
:
case
WM_SYSCHAR
:
case
WM_SYSDEADCHAR
:
case
WM_MENUCHAR
:
{
WCHAR
wch
=
LOWORD
(
wparam
);
char
ch
;
BYTE
ch
;
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
&
ch
,
1
,
NULL
,
NULL
);
wparam
=
MAKEWPARAM
(
(
unsigned
char
)
ch
,
HIWORD
(
wparam
)
);
wparam
=
MAKEWPARAM
(
ch
,
HIWORD
(
wparam
)
);
}
break
;
case
WM_IME_CHAR
:
{
WCHAR
wch
=
LOWORD
(
wparam
);
BYTE
ch
[
2
];
ch
[
1
]
=
0
;
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
ch
,
2
,
NULL
,
NULL
);
wparam
=
MAKEWPARAM
(
(
ch
[
0
]
<<
8
)
|
ch
[
1
],
HIWORD
(
wparam
)
);
}
break
;
}
return
wparam
;
}
...
...
windows/winproc.c
View file @
17c63bba
...
...
@@ -729,6 +729,17 @@ INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
}
return
0
;
case
WM_IME_CHAR
:
{
BYTE
ch
[
2
];
WCHAR
wch
;
ch
[
0
]
=
(
*
pwparam
>>
8
);
ch
[
1
]
=
*
pwparam
&
0xff
;
MultiByteToWideChar
(
CP_ACP
,
0
,
ch
,
2
,
&
wch
,
1
);
*
pwparam
=
MAKEWPARAM
(
wch
,
HIWORD
(
*
pwparam
)
);
}
return
0
;
case
WM_PAINTCLIPBOARD
:
case
WM_SIZECLIPBOARD
:
FIXME_
(
msg
)(
"message %s (0x%x) needs translation, please report
\n
"
,
SPY_GetMsgName
(
msg
,
hwnd
),
msg
);
...
...
@@ -985,6 +996,17 @@ INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
}
return
0
;
case
WM_IME_CHAR
:
{
WCHAR
wch
=
LOWORD
(
*
pwparam
);
BYTE
ch
[
2
];
ch
[
1
]
=
0
;
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
ch
,
2
,
NULL
,
NULL
);
*
pwparam
=
MAKEWPARAM
(
(
ch
[
0
]
<<
8
)
|
ch
[
1
],
HIWORD
(
*
pwparam
)
);
}
return
0
;
case
WM_PAINTCLIPBOARD
:
case
WM_SIZECLIPBOARD
:
FIXME_
(
msg
)(
"message %s (%04x) needs translation, please report
\n
"
,
SPY_GetMsgName
(
msg
,
hwnd
),
msg
);
...
...
@@ -1648,6 +1670,15 @@ INT WINPROC_MapMsg16To32W( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms
MultiByteToWideChar
(
CP_ACP
,
0
,
&
ch
,
1
,
&
wch
,
1
);
*
pwparam32
=
wch
;
return
0
;
case
WM_IME_CHAR
:
{
char
ch
[
2
];
ch
[
0
]
=
(
wParam16
>>
8
);
ch
[
1
]
=
wParam16
&
0xff
;
MultiByteToWideChar
(
CP_ACP
,
0
,
ch
,
2
,
&
wch
,
1
);
*
pwparam32
=
wch
;
}
return
0
;
default:
/* No Unicode translation needed */
return
WINPROC_MapMsg16To32A
(
hwnd
,
msg16
,
wParam16
,
pmsg32
,
...
...
@@ -2504,6 +2535,17 @@ INT WINPROC_MapMsg32WTo16( HWND hwnd, UINT msg32, WPARAM wParam32,
*
pwparam16
=
ch
;
return
0
;
case
WM_IME_CHAR
:
{
BYTE
ch
[
2
];
wch
=
wParam32
;
ch
[
1
]
=
0
;
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
ch
,
2
,
NULL
,
NULL
);
*
pwparam16
=
(
ch
[
0
]
<<
8
)
|
ch
[
1
];
}
return
0
;
default:
/* No Unicode translation needed (?) */
return
WINPROC_MapMsg32ATo16
(
hwnd
,
msg32
,
wParam32
,
pmsg16
,
pwparam16
,
plparam
);
...
...
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