aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-05-13 13:35:38 +1000
committerNeil <nyamatongwe@gmail.com>2015-05-13 13:35:38 +1000
commit8655885818137bc46fca80e4f662bbfb6975f83f (patch)
tree26feec15fcb4ee9822836655a53d49933648284f /win32/PlatWin.cxx
parentc5d8d10a379619d4c13932d4c2ce6c6454ff78f3 (diff)
downloadscintilla-mirror-8655885818137bc46fca80e4f662bbfb6975f83f.tar.gz
Bug [#1703]. Fix bug when drawing text margins in buffered mode which would use
default encoding instead of chosen encoding.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 37724ced8..6ea35d388 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -634,11 +634,14 @@ void SurfaceGDI::Init(SurfaceID sid, WindowID) {
void SurfaceGDI::InitPixMap(int width, int height, Surface *surface_, WindowID) {
Release();
- hdc = ::CreateCompatibleDC(static_cast<SurfaceGDI *>(surface_)->hdc);
+ SurfaceGDI *psurfOther = static_cast<SurfaceGDI *>(surface_);
+ hdc = ::CreateCompatibleDC(psurfOther->hdc);
hdcOwned = true;
- bitmap = ::CreateCompatibleBitmap(static_cast<SurfaceGDI *>(surface_)->hdc, width, height);
+ bitmap = ::CreateCompatibleBitmap(psurfOther->hdc, width, height);
bitmapOld = static_cast<HBITMAP>(::SelectObject(hdc, bitmap));
::SetTextAlign(reinterpret_cast<HDC>(hdc), TA_BASELINE);
+ SetUnicodeMode(psurfOther->unicodeMode);
+ SetDBCSMode(psurfOther->codePage);
}
void SurfaceGDI::PenColour(ColourDesired fore) {
@@ -1287,6 +1290,8 @@ void SurfaceD2D::InitPixMap(int width, int height, Surface *surface_, WindowID)
pRenderTarget->BeginDraw();
ownRenderTarget = true;
}
+ SetUnicodeMode(psurfOther->unicodeMode);
+ SetDBCSMode(psurfOther->codePage);
}
void SurfaceD2D::PenColour(ColourDesired fore) {