implement wxLoadedDLL, a safer alternative to wxDL_GET_LOADED (closes #10208)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-17 22:19:41 +00:00
parent 834c8ade28
commit 5a9379d7b0
4 changed files with 30 additions and 25 deletions

View File

@@ -5289,11 +5289,8 @@ bool wxWindowMSW::HandleMouseMove(int x, int y, WXUINT flags)
if ( !s_initDone )
{
// see comment in wxApp::GetComCtl32Version() explaining the
// use of wxDL_GET_LOADED
wxDynamicLibrary dllComCtl32(_T("comctl32.dll"),
wxDL_VERBATIM |
wxDL_QUIET |
wxDL_GET_LOADED);
// use of wxLoadedDLL
wxLoadedDLL dllComCtl32(_T("comctl32.dll"));
if ( dllComCtl32.IsLoaded() )
{
s_pfn_TrackMouseEvent = (_TrackMouseEvent_t)
@@ -5301,10 +5298,6 @@ bool wxWindowMSW::HandleMouseMove(int x, int y, WXUINT flags)
}
s_initDone = true;
// we shouldn't unload comctl32.dll here as we didn't really
// load it above
dllComCtl32.Detach();
}
if ( s_pfn_TrackMouseEvent )