]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/datecontrols.cpp
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / src / msw / datecontrols.cpp
index e8503510776cc5c8a53055afefcd4e56e6237276..501ff039fb64836e40b34e90c7ba553061420156 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     implementation of date controls helper functions
 // Author:      Vadim Zeitlin
 // Created:     2008-04-04
-// RCS-ID:      $Id$
 // Copyright:   (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -24,6 +23,8 @@
 #endif
 
 #ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/msw/wrapcctl.h"
 #endif // WX_PRECOMP
 
 #if wxUSE_DATEPICKCTRL || wxUSE_CALENDARCTRL
@@ -65,10 +66,13 @@ 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 wxLoadedDLL
+        wxLoadedDLL dllComCtl32(wxT("comctl32.dll"));
         if ( dllComCtl32.IsLoaded() )
         {
+            wxLogNull noLog;
+
             typedef BOOL (WINAPI *ICCEx_t)(INITCOMMONCONTROLSEX *);
             wxDYNLIB_FUNCTION( ICCEx_t, InitCommonControlsEx, dllComCtl32 );