don't load comctl32.dll, just get the handle of the already loaded instance of it instead, this avoids accidentally loading 2 different versions of this DLL in the same process (see #10203)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -67,10 +67,17 @@ bool wxMSWDateControls::CheckInitialization()
|
||||
icex.dwSize = sizeof(icex);
|
||||
icex.dwICC = ICC_DATE_CLASSES;
|
||||
|
||||
wxDynamicLibrary dllComCtl32(_T("comctl32.dll") , wxDL_VERBATIM);
|
||||
// see comment in wxApp::GetComCtl32Version() explaining the
|
||||
// use of wxDL_GET_LOADED
|
||||
wxDynamicLibrary dllComCtl32(_T("comctl32.dll"),
|
||||
wxDL_VERBATIM |
|
||||
wxDL_QUIET |
|
||||
wxDL_GET_LOADED);
|
||||
|
||||
if ( dllComCtl32.IsLoaded() )
|
||||
{
|
||||
wxLogNull noLog;
|
||||
|
||||
typedef BOOL (WINAPI *ICCEx_t)(INITCOMMONCONTROLSEX *);
|
||||
wxDYNLIB_FUNCTION( ICCEx_t, InitCommonControlsEx, dllComCtl32 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user