[ 1212972 ] fix dmc bug

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@34774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Chris Elliott
2005-06-29 15:53:08 +00:00
parent 660fefacf6
commit 7074e7ed5c

View File

@@ -41,26 +41,27 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include "wx/app.h" // for GetComCtl32Version #include "wx/app.h" // for GetComCtl32Version
#if wxUSE_DYNLIB_CLASS
#include "wx/dynlib.h"
#endif
wxUxThemeEngine* g_pThemeEngine = ((wxUxThemeEngine*)NULL) ; wxUxThemeEngine* g_pThemeEngine = ((wxUxThemeEngine*)NULL) ;
BOOL wxCanUseInitThemeEngine() BOOL wxCanUseInitThemeEngine()
{ {
OSVERSIONINFOEX wxuosex ; #if wxUSE_DYNLIB_CLASS
memset((void*)&wxuosex, 0, sizeof(OSVERSIONINFOEX)) ; //suppress errors if we don't find it -- that's expected on nonXP systems
wxuosex.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX) ; wxLogNull NullLog ;
if(!GetVersionEx((LPOSVERSIONINFO)&wxuosex)) wxDynamicLibrary uxthemelib ( wxT("uxtheme.dll") );
{
wxuosex.dwOSVersionInfoSize = sizeof(OSVERSIONINFO) ; if (uxthemelib.IsLoaded())
if(!GetVersionEx((LPOSVERSIONINFO)&wxuosex))
{
return FALSE ;
}
}
if ((wxuosex.dwMajorVersion == 5) && (wxuosex.dwMinorVersion > 0))
{ {
//just discard this for 2.4 branch - code is externsively rewritten in CVS HEAD
uxthemelib.Unload ();
return (wxTheApp->GetComCtl32Version() >= 600) ; return (wxTheApp->GetComCtl32Version() >= 600) ;
} }
else else
#endif //wxUSE_DYNLIB_CLASS
{ {
return FALSE ; return FALSE ;
} }