From fecb60c3edd080140e04ed081971cec1fcf5fe97 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 23 Jul 2012 15:04:09 +0000 Subject: [PATCH] Don't constantly reload comctl32.dll in wxTreeCtrl::MSWOnNotify(). The "loaded" flag was never set to true, so we kept reloading the DLL on every callback. Do set the flag after loading it successfully. Closes #14512. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/treectrl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index e84bd1b324..9e99796c0a 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -3513,7 +3513,10 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) { wxLoadedDLL dllComCtl32(wxT("comctl32.dll")); if ( dllComCtl32.IsLoaded() ) + { wxDL_INIT_FUNC(s_pfn, ImageList_Copy, dllComCtl32); + loaded = true; + } } if ( !s_pfnImageList_Copy ) -- 2.45.2