diff --git a/src/msw/datecontrols.cpp b/src/msw/datecontrols.cpp index 6960f09aee..0ea7e786a1 100644 --- a/src/msw/datecontrols.cpp +++ b/src/msw/datecontrols.cpp @@ -81,6 +81,8 @@ bool wxMSWDateControls::CheckInitialization() typedef BOOL (WINAPI *ICCEx_t)(INITCOMMONCONTROLSEX *); wxDYNLIB_FUNCTION( ICCEx_t, InitCommonControlsEx, dllComCtl32 ); + dllComCtl32.Detach(); + if ( pfnInitCommonControlsEx ) { s_initResult = (*pfnInitCommonControlsEx)(&icex);