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
c91d9f0c
Commit
c91d9f0c
authored
Jan 26, 2004
by
Yoshiro Takeno
Committed by
Alexandre Julliard
Jan 26, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In Windows, the leading byte for multibyte characters are set to upper
byte. If single byte character is used, the upper byte is set to 0.
parent
b9e56b9b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
12 deletions
+19
-12
edit.c
controls/edit.c
+2
-1
message.c
dlls/user/message.c
+6
-4
defwnd.c
windows/defwnd.c
+3
-3
winproc.c
windows/winproc.c
+8
-4
No files found.
controls/edit.c
View file @
c91d9f0c
...
...
@@ -772,7 +772,8 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
strng
[
0
]
=
wParam
>>
8
;
strng
[
1
]
=
wParam
&
0xff
;
MultiByteToWideChar
(
CP_ACP
,
0
,
strng
,
2
,
&
charW
,
1
);
if
(
strng
[
0
])
MultiByteToWideChar
(
CP_ACP
,
0
,
strng
,
2
,
&
charW
,
1
);
else
MultiByteToWideChar
(
CP_ACP
,
0
,
&
strng
[
1
],
1
,
&
charW
,
1
);
EDIT_WM_Char
(
es
,
charW
);
break
;
}
...
...
dlls/user/message.c
View file @
c91d9f0c
...
...
@@ -347,7 +347,8 @@ static WPARAM map_wparam_AtoW( UINT message, WPARAM wparam )
WCHAR
wch
;
ch
[
0
]
=
(
wparam
>>
8
);
ch
[
1
]
=
(
wparam
&
0xff
);
MultiByteToWideChar
(
CP_ACP
,
0
,
ch
,
2
,
&
wch
,
1
);
if
(
ch
[
0
])
MultiByteToWideChar
(
CP_ACP
,
0
,
ch
,
2
,
&
wch
,
1
);
else
MultiByteToWideChar
(
CP_ACP
,
0
,
&
ch
[
1
],
1
,
&
wch
,
1
);
wparam
=
MAKEWPARAM
(
wch
,
HIWORD
(
wparam
)
);
}
break
;
...
...
@@ -384,9 +385,10 @@ static WPARAM map_wparam_WtoA( UINT message, WPARAM wparam )
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
)
);
if
(
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
ch
,
2
,
NULL
,
NULL
)
==
2
)
wparam
=
MAKEWPARAM
(
(
ch
[
0
]
<<
8
)
|
ch
[
1
],
HIWORD
(
wparam
)
);
else
wparam
=
MAKEWPARAM
(
ch
[
0
],
HIWORD
(
wparam
)
);
}
break
;
}
...
...
windows/defwnd.c
View file @
c91d9f0c
...
...
@@ -871,9 +871,9 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
CHAR
chChar1
=
(
CHAR
)(
(
wParam
>>
8
)
&
0xff
);
CHAR
chChar2
=
(
CHAR
)(
wParam
&
0xff
);
SendMessageA
(
hwnd
,
WM_CHAR
,
(
WPARAM
)
chChar1
,
lParam
);
if
(
IsDBCSLeadByte
(
chChar1
)
)
SendMessageA
(
hwnd
,
WM_CHAR
,
(
WPARAM
)
chChar2
,
lParam
);
if
(
chChar1
)
SendMessageA
(
hwnd
,
WM_CHAR
,
(
WPARAM
)
chChar1
,
lParam
);
SendMessageA
(
hwnd
,
WM_CHAR
,
(
WPARAM
)
chChar2
,
lParam
);
}
break
;
case
WM_IME_KEYDOWN
:
...
...
windows/winproc.c
View file @
c91d9f0c
...
...
@@ -797,7 +797,10 @@ INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
WCHAR
wch
;
ch
[
0
]
=
(
*
pwparam
>>
8
);
ch
[
1
]
=
*
pwparam
&
0xff
;
MultiByteToWideChar
(
CP_ACP
,
0
,
ch
,
2
,
&
wch
,
1
);
if
(
ch
[
0
])
MultiByteToWideChar
(
CP_ACP
,
0
,
ch
,
2
,
&
wch
,
1
);
else
MultiByteToWideChar
(
CP_ACP
,
0
,
&
ch
[
1
],
1
,
&
wch
,
1
);
*
pwparam
=
MAKEWPARAM
(
wch
,
HIWORD
(
*
pwparam
)
);
}
return
0
;
...
...
@@ -1092,9 +1095,10 @@ INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
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
)
);
if
(
WideCharToMultiByte
(
CP_ACP
,
0
,
&
wch
,
1
,
ch
,
2
,
NULL
,
NULL
)
==
2
)
*
pwparam
=
MAKEWPARAM
(
(
ch
[
0
]
<<
8
)
|
ch
[
1
],
HIWORD
(
*
pwparam
)
);
else
*
pwparam
=
MAKEWPARAM
(
ch
[
0
],
HIWORD
(
*
pwparam
)
);
}
return
0
;
...
...
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