X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..300aaa8f77daee5cd740c8c4cce63f40c6bfae4b:/src/msw/dcclient.cpp diff --git a/src/msw/dcclient.cpp b/src/msw/dcclient.cpp index 483fd55376..46642e078f 100644 --- a/src/msw/dcclient.cpp +++ b/src/msw/dcclient.cpp @@ -262,3 +262,20 @@ wxPaintDCInfo *wxPaintDC::FindInCache(size_t *index) const return info; } + +// find the entry for this DC in the cache (keyed by the window) +WXHDC wxPaintDC::FindDCInCache(wxWindow* win) +{ + wxPaintDCInfo *info = NULL; + size_t nCache = ms_cache.GetCount(); + for ( size_t n = 0; n < nCache; n++ ) + { + info = &ms_cache[n]; + if ( info->hwnd == win->GetHWND() ) + { + return info->hdc; + } + } + return 0; +} +