From a2992451c9a80d700529f3926c9c3d6b2c2fc8cf Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 19 Apr 2003 21:41:38 +0000 Subject: Added processing of WM_UNICHAR. --- win32/ScintillaWin.cxx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index a49daf61b..c8bf2cf81 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -52,6 +52,11 @@ #define SPI_GETWHEELSCROLLLINES 104 #endif +#ifndef WM_UNICHAR +#define WM_UNICHAR 0x0109 +#define UNICODE_NOCHAR 0xFFFF +#endif + // These undefinitions are required to work around differences between different versions // of the mingw headers, some of which define these twice, in both winuser.h and imm.h. #ifdef __MINGW_H @@ -636,6 +641,20 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam } return 1; + case WM_UNICHAR: + if (wParam == UNICODE_NOCHAR) { + return 1; + } else if (lastKeyDownConsumed) { + return 1; + } else { + if (IsUnicodeMode()) { + AddCharBytes(static_cast(wParam & 0xff)); + return 1; + } else { + return 0; + } + } + case WM_SYSKEYDOWN: case WM_KEYDOWN: { //Platform::DebugPrintf("S keydown %d %x %x %x %x\n",iMessage, wParam, lParam, ::IsKeyDown(VK_SHIFT), ::IsKeyDown(VK_CONTROL)); -- cgit v1.2.3