Added several additional to/from unicode message mappings.
This commit is contained in:
parent
218188c2d2
commit
1e15223fb4
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winnls.h"
|
#include "winbase.h"
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "wine/winbase16.h"
|
#include "wine/winbase16.h"
|
||||||
#include "wine/winuser16.h"
|
#include "wine/winuser16.h"
|
||||||
|
@ -669,6 +669,7 @@ INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
|
||||||
case WM_DEADCHAR:
|
case WM_DEADCHAR:
|
||||||
case WM_SYSCHAR:
|
case WM_SYSCHAR:
|
||||||
case WM_SYSDEADCHAR:
|
case WM_SYSDEADCHAR:
|
||||||
|
case EM_SETPASSWORDCHAR:
|
||||||
{
|
{
|
||||||
char ch = *pwparam;
|
char ch = *pwparam;
|
||||||
WCHAR wch;
|
WCHAR wch;
|
||||||
|
@ -681,7 +682,6 @@ INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
|
||||||
case WM_DEVMODECHANGE:
|
case WM_DEVMODECHANGE:
|
||||||
case WM_PAINTCLIPBOARD:
|
case WM_PAINTCLIPBOARD:
|
||||||
case WM_SIZECLIPBOARD:
|
case WM_SIZECLIPBOARD:
|
||||||
case EM_SETPASSWORDCHAR:
|
|
||||||
FIXME_(msg)("message %s (0x%x) needs translation, please report\n", SPY_GetMsgName(msg), msg );
|
FIXME_(msg)("message %s (0x%x) needs translation, please report\n", SPY_GetMsgName(msg), msg );
|
||||||
return -1;
|
return -1;
|
||||||
default: /* No translation needed */
|
default: /* No translation needed */
|
||||||
|
@ -910,6 +910,7 @@ INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
|
||||||
case WM_DEADCHAR:
|
case WM_DEADCHAR:
|
||||||
case WM_SYSCHAR:
|
case WM_SYSCHAR:
|
||||||
case WM_SYSDEADCHAR:
|
case WM_SYSDEADCHAR:
|
||||||
|
case EM_SETPASSWORDCHAR:
|
||||||
{
|
{
|
||||||
WCHAR wch = *pwparam;
|
WCHAR wch = *pwparam;
|
||||||
char ch;
|
char ch;
|
||||||
|
@ -922,7 +923,6 @@ INT WINPROC_MapMsg32WTo32A( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plpara
|
||||||
case WM_DEVMODECHANGE:
|
case WM_DEVMODECHANGE:
|
||||||
case WM_PAINTCLIPBOARD:
|
case WM_PAINTCLIPBOARD:
|
||||||
case WM_SIZECLIPBOARD:
|
case WM_SIZECLIPBOARD:
|
||||||
case EM_SETPASSWORDCHAR:
|
|
||||||
FIXME_(msg)("message %s (%04x) needs translation, please report\n",SPY_GetMsgName(msg),msg );
|
FIXME_(msg)("message %s (%04x) needs translation, please report\n",SPY_GetMsgName(msg),msg );
|
||||||
return -1;
|
return -1;
|
||||||
default: /* No translation needed */
|
default: /* No translation needed */
|
||||||
|
@ -1416,6 +1416,39 @@ INT WINPROC_MapMsg16To32W( HWND16 hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *p
|
||||||
{
|
{
|
||||||
switch(msg16)
|
switch(msg16)
|
||||||
{
|
{
|
||||||
|
case EM_GETLINE16:
|
||||||
|
{
|
||||||
|
WORD len = (WORD)*plparam;
|
||||||
|
LPARAM *ptr = (LPARAM *)HeapAlloc(GetProcessHeap(), 0, sizeof(LPARAM) + sizeof(WORD) + len * sizeof(WCHAR));
|
||||||
|
if(!ptr) return -1;
|
||||||
|
*ptr++ = *plparam; /* Store previous lParam */
|
||||||
|
*((WORD *)ptr) = len; /* Store the length */
|
||||||
|
*plparam = (LPARAM)ptr;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case EM_REPLACESEL16:
|
||||||
|
{
|
||||||
|
WCHAR *str;
|
||||||
|
INT len;
|
||||||
|
*plparam = (LPARAM)PTR_SEG_TO_LIN(*plparam);
|
||||||
|
len = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*plparam, -1, NULL, 0);
|
||||||
|
str = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||||
|
if(!str) return -1;
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*plparam, -1, str, len);
|
||||||
|
*plparam = (LPARAM)str;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
case EM_SETPASSWORDCHAR16:
|
||||||
|
{
|
||||||
|
char ch = wParam16;
|
||||||
|
WCHAR wch;
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, &ch, 1, &wch, 1);
|
||||||
|
*pwparam32 = wch;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
case WM_GETTEXT:
|
case WM_GETTEXT:
|
||||||
case WM_SETTEXT:
|
case WM_SETTEXT:
|
||||||
*plparam = (LPARAM)PTR_SEG_TO_LIN(*plparam);
|
*plparam = (LPARAM)PTR_SEG_TO_LIN(*plparam);
|
||||||
|
@ -1513,6 +1546,22 @@ LRESULT WINPROC_UnmapMsg16To32W( HWND16 hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||||
{
|
{
|
||||||
switch(msg)
|
switch(msg)
|
||||||
{
|
{
|
||||||
|
case EM_GETLINE16:
|
||||||
|
{
|
||||||
|
LPARAM *ptr = (LPARAM *)lParam - 1; /* get the old lParam */
|
||||||
|
WORD len = *(WORD *)lParam;
|
||||||
|
*ptr = (LPARAM)PTR_SEG_TO_LIN(*ptr);
|
||||||
|
if(len > 0 && !WideCharToMultiByte(CP_ACP, 0, (LPWSTR)lParam, -1,
|
||||||
|
(LPSTR)*ptr, len, NULL, NULL))
|
||||||
|
((LPSTR)*ptr)[len-1] = 0;
|
||||||
|
HeapFree(GetProcessHeap(), 0, ptr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EM_REPLACESEL16:
|
||||||
|
HeapFree(GetProcessHeap(), 0, (void *)lParam);
|
||||||
|
break;
|
||||||
|
|
||||||
case WM_GETTEXT:
|
case WM_GETTEXT:
|
||||||
case WM_SETTEXT:
|
case WM_SETTEXT:
|
||||||
WINPROC_UnmapMsg32ATo32W( hwnd, msg, wParam, lParam );
|
WINPROC_UnmapMsg32ATo32W( hwnd, msg, wParam, lParam );
|
||||||
|
|
Loading…
Reference in New Issue