X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5adad46628e545a6d4172ecf3a0cb848934f5cd0..90f501b16e1b6dcc9e2aae6a413287a22842da61:/src/msw/dcclient.cpp?ds=sidebyside diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 8cef83d45b..6d5df17f48 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -113,6 +113,11 @@ void wxWindowDC::InitDC() // default bg colour is pne of the window SetBackground(wxBrush(m_canvas->GetBackgroundColour(), wxSOLID)); + + // since we are a window dc we need to grab the palette from the window +#if wxUSE_PALETTE + InitializePalette(); +#endif } // ---------------------------------------------------------------------------- @@ -237,7 +242,7 @@ wxPaintDC::~wxPaintDC() { ::EndPaint(GetHwndOf(m_canvas), &g_paintStruct); - ms_cache.Remove(index); + ms_cache.RemoveAt(index); // Reduce the number of bogus reports of non-freed memory // at app exit