diff options
| author | Neil <nyamatongwe@gmail.com> | 2015-05-13 13:35:38 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2015-05-13 13:35:38 +1000 | 
| commit | b57c5c13df4434754f3bf3d39c20e1926578a6da (patch) | |
| tree | e3d716764d3dd87811f1c2ccf2145558050ec884 /win32/PlatWin.cxx | |
| parent | 5f5ca4123c3a3ae3443e8f45c2b3d4df7309c708 (diff) | |
| download | scintilla-mirror-b57c5c13df4434754f3bf3d39c20e1926578a6da.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.cxx | 9 | 
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) {  | 
