From 165713090e9df0df1209ffa3acdb78aebf58e132 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 5 Oct 2001 10:09:42 +0000 Subject: Don't include zmouse.h with Digital Mars compiler. Disable IME code when compiling with Digital Mars as it doesn't have lib. --- win32/ScintillaWin.cxx | 64 ++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 28 deletions(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 77dd71288..90cb275a5 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -69,8 +69,10 @@ #include #ifndef __BORLANDC__ +#ifndef __DMC__ #include #endif +#endif #include #ifndef MK_ALT @@ -406,40 +408,44 @@ LRESULT ScintillaWin::WndPaint(unsigned long wParam) { } static BOOL IsNT() { - OSVERSIONINFO osv = {sizeof(OSVERSIONINFO),0,0,0,0,""}; - ::GetVersionEx(&osv); - return osv.dwPlatformId == VER_PLATFORM_WIN32_NT; + OSVERSIONINFO osv = {sizeof(OSVERSIONINFO),0,0,0,0,""}; + ::GetVersionEx(&osv); + return osv.dwPlatformId == VER_PLATFORM_WIN32_NT; } sptr_t ScintillaWin::HandleComposition(uptr_t wParam, sptr_t lParam) { - if ((lParam & GCS_RESULTSTR) && (IsNT())) { - HIMC hIMC = ::ImmGetContext(wMain.GetID()); - if (hIMC) { - const int maxLenInputIME = 200; - wchar_t wcs[maxLenInputIME]; - LONG bytes = ::ImmGetCompositionStringW(hIMC, - GCS_RESULTSTR, wcs, (maxLenInputIME-1)*2); - int wides = bytes / 2; - if (IsUnicodeMode()) { - char utfval[maxLenInputIME * 3]; - unsigned int len = UTF8Length(wcs, wides); - UTF8FromUCS2(wcs, wides, utfval, len); - utfval[len] = '\0'; - AddCharUTF(utfval, len); - } else { - char dbcsval[maxLenInputIME * 2]; - int size = ::WideCharToMultiByte(InputCodePage(), - 0, wcs, wides, dbcsval, sizeof(dbcsval) - 1, 0, 0); - for (int i=0; i