diff options
| author | nyamatongwe <unknown> | 2004-08-03 01:37:22 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2004-08-03 01:37:22 +0000 | 
| commit | 162aa0cad54f2e6b26cb7f5b8e78c3db0874c0a9 (patch) | |
| tree | 83c6c83ccb5638944233b3e458fc620e54f4a63b | |
| parent | cbe718276c8e78c5552e4c598361dab690549a7f (diff) | |
| download | scintilla-mirror-162aa0cad54f2e6b26cb7f5b8e78c3db0874c0a9.tar.gz | |
Patch from Kein-Hong Man to ensure system caret bitmap is empty.
| -rw-r--r-- | win32/ScintillaWin.cxx | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index be21fa4d5..647ae982e 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2138,7 +2138,13 @@ BOOL ScintillaWin::CreateSystemCaret() {  		sysCaretWidth = 1;  	}  	sysCaretHeight = vs.lineHeight; -	sysCaretBitmap = ::CreateBitmap(sysCaretWidth, sysCaretHeight, 1, 1, NULL); +	int bitmapSize = (((sysCaretWidth + 15) & ~15) >> 3) * +		sysCaretHeight; +	char *bits = new char[bitmapSize]; +	memset(bits, 0, bitmapSize); +	sysCaretBitmap = ::CreateBitmap(sysCaretWidth, sysCaretHeight, 1, +		1, reinterpret_cast<BYTE *>(bits)); +	delete []bits;  	BOOL retval = ::CreateCaret(  		MainHWND(), sysCaretBitmap,  		sysCaretWidth, sysCaretHeight); | 
