aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2005-07-22 13:24:40 +0000
committernyamatongwe <devnull@localhost>2005-07-22 13:24:40 +0000
commite297178aa3ce5f41309be9dc25c9b15d8656d007 (patch)
tree65659e9312590bfd176bbd54fcf0d6f2760036a9
parent43c1859980ea3f8305769f1a5b35780a308637ed (diff)
downloadscintilla-mirror-e297178aa3ce5f41309be9dc25c9b15d8656d007.tar.gz
Ensure DCs are emptied of non-stock, non-default objects before they are
released to keep BoundsChecker happy.
-rw-r--r--win32/ScintillaWin.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index fce2af9d4..b36cc276b 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1832,6 +1832,8 @@ void ScintillaWin::HorizontalScrollMessage(WPARAM wParam) {
void ScintillaWin::RealizeWindowPalette(bool inBackGround) {
RefreshStyleData();
HDC hdc = ::GetDC(MainHWND());
+ // Select a stock font to prevent warnings from BoundsChecker
+ ::SelectObject(hdc, GetStockFont(DEFAULT_GUI_FONT));
AutoSurface surfaceWindow(hdc, this);
if (surfaceWindow) {
int changes = surfaceWindow->SetPalette(&palette, inBackGround);