]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't constantly reload comctl32.dll in wxTreeCtrl::MSWOnNotify().
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Jul 2012 15:04:09 +0000 (15:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Jul 2012 15:04:09 +0000 (15:04 +0000)
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

index e84bd1b324b8d97e258c904201ad5d8a94d76c73..9e99796c0ab74484a7a3fac7821d64c45d1c562d 100644 (file)
@@ -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 )