From 693b27d2617d1b288fc60fdfda4fb536754bab70 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 22 Jul 2005 13:24:40 +0000 Subject: Ensure DCs are emptied of non-stock, non-default objects before they are released to keep BoundsChecker happy. --- win32/ScintillaWin.cxx | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3