This avoids the problem with mistakenly using wrong HDC in wxBitmapComboBox
code which was due to assuming that we can only ever have one paint HDC for
the given window -- while in wxBitmapComboBox case we are passed different
HDCs for the same window via WM_DRAWITEM.
Instead of fixing the cache, just don't use it at all for wxPaintDCEx as we
don't gain anything from doing it anyhow.
Closes #14842.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73625
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxCHECK_RET( dc, wxT("wxPaintDCEx requires an existing device context") );
m_window = window;
-
- m_hDC = FindDCInCache(m_window);
- if ( !m_hDC )
- {
- // not in cache, record it there
- gs_PaintDCInfos[m_window] = new wxPaintDCInfoExternal(dc);
-
- m_hDC = dc;
- }
+ m_hDC = dc;
}
wxPaintDCExImpl::~wxPaintDCExImpl()