diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/PlatWin.cxx | 6 | ||||
-rw-r--r-- | win32/ScintillaWin.cxx | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 9519001b4..6e2ff1b1a 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -322,6 +322,7 @@ public: void FlushCachedState(); void SetUnicodeMode(bool unicodeMode_); + void SetDBCSMode(int codePage); }; SurfaceImpl::SurfaceImpl() : @@ -692,6 +693,10 @@ void SurfaceImpl::SetUnicodeMode(bool unicodeMode_) { unicodeMode=unicodeMode_; } +void SurfaceImpl::SetDBCSMode(int) { + // No action on window as automatically handled by system. +} + Surface *Surface::Allocate() { return new SurfaceImpl; } @@ -1051,6 +1056,7 @@ void ListBoxX::Draw(DRAWITEMSTRUCT *pDrawItem) { if (surfaceItem) { surfaceItem->Init(pDrawItem->hDC); //surf->SetUnicodeMode(unicodeMode); + //surf->SetDBCSMode(codePage); int left = pDrawItem->rcItem.left; PRectangle rc(left + 1, pDrawItem->rcItem.top, left + 1 + widthPix, pDrawItem->rcItem.bottom); diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index fb9ec1633..983a5906f 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -379,7 +379,7 @@ LRESULT ScintillaWin::WndPaint(uptr_t wParam) { pps = &ps; ::BeginPaint(MainHWND(), pps); } - AutoSurface surfaceWindow(pps->hdc, IsUnicodeMode()); + AutoSurface surfaceWindow(pps->hdc, CodePage()); if (surfaceWindow) { rcPaint = PRectangle(pps->rcPaint.left, pps->rcPaint.top, pps->rcPaint.right, pps->rcPaint.bottom); PRectangle rcClient = GetClientRectangle(); @@ -1426,7 +1426,7 @@ void ScintillaWin::ImeStartComposition() { int sizeZoomed = vs.styles[styleHere].size + vs.zoomLevel; if (sizeZoomed <= 2) // Hangs if sizeZoomed <= 1 sizeZoomed = 2; - AutoSurface surface(IsUnicodeMode()); + AutoSurface surface(CodePage()); int deviceHeight = sizeZoomed; if (surface) { deviceHeight = (sizeZoomed * surface->LogPixelsY()) / 72; @@ -1587,7 +1587,7 @@ void ScintillaWin::HorizontalScrollMessage(WPARAM wParam) { void ScintillaWin::RealizeWindowPalette(bool inBackGround) { RefreshStyleData(); HDC hdc = ::GetDC(MainHWND()); - AutoSurface surfaceWindow(hdc, IsUnicodeMode()); + AutoSurface surfaceWindow(hdc, CodePage()); if (surfaceWindow) { int changes = surfaceWindow->SetPalette(&palette, inBackGround); if (changes > 0) @@ -1606,7 +1606,7 @@ void ScintillaWin::FullPaint() { rcPaint = GetClientRectangle(); paintingAllText = true; HDC hdc = ::GetDC(MainHWND()); - AutoSurface surfaceWindow(hdc, IsUnicodeMode()); + AutoSurface surfaceWindow(hdc, CodePage()); if (surfaceWindow) { Paint(surfaceWindow, rcPaint); surfaceWindow->Release(); @@ -1929,7 +1929,7 @@ sptr_t PASCAL ScintillaWin::CTWndProc( } else if (iMessage == WM_PAINT) { PAINTSTRUCT ps; ::BeginPaint(hWnd, &ps); - AutoSurface surfaceWindow(ps.hdc, ctp->unicodeMode); + AutoSurface surfaceWindow(ps.hdc, ctp->codePage); if (surfaceWindow) { ctp->PaintCT(surfaceWindow); surfaceWindow->Release(); |