X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4104ed92a537f36f7f41ce07d34cadbe4d78685c..cb73e6001f891ae46b12a1e4ca39b93649cb6099:/src/msw/app.cpp diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 2b12d8ebb0..ec3c4c0124 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -17,7 +17,7 @@ // headers // --------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "app.h" #endif @@ -85,37 +85,11 @@ #include #include -#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__WXMICROWIN__)) && !defined(__CYGWIN10__)) - #include -#endif - -// ---------------------------------------------------------------------------- -// conditional compilation -// ---------------------------------------------------------------------------- - -// The macro _WIN32_IE is defined by commctrl.h (unless it had already been -// defined before) and shows us what common control features are available -// during the compile time (it doesn't mean that they will be available during -// the run-time, use GetComCtl32Version() to test for them!). The possible -// values are: -// -// 0x0200 for comctl32.dll 4.00 shipped with Win95/NT 4.0 -// 0x0300 4.70 IE 3.x -// 0x0400 4.71 IE 4.0 -// 0x0401 4.72 IE 4.01 and Win98 -// 0x0500 5.80 IE 5.x -// 0x0500 5.81 Win2k/ME -// 0x0600 6.00 WinXP - -#ifndef _WIN32_IE - // use maximal set of features by default, we check for them during - // run-time anyhow - #define _WIN32_IE 0x0600 -#endif +#include "wx/msw/wrapcctl.h" #if (!defined(__MINGW32__) || wxCHECK_W32API_VERSION( 2, 0 )) && \ - !defined(__CYGWIN__) && !defined(__WXWINCE__) && \ - (!defined(_MSC_VER) || (_MSC_VER > 1100)) + !defined(__CYGWIN__) && !defined(__DIGITALMARS__) && !defined(__WXWINCE__) && \ + (!defined(_MSC_VER) || (_MSC_VER > 1100)) #include #endif @@ -229,6 +203,22 @@ bool wxGUIAppTraits::DoMessageFromThreadWait() return !wxTheApp || wxTheApp->DoMessage(); } +wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo() +{ + static wxToolkitInfo info; + wxToolkitInfo& baseInfo = wxAppTraits::GetToolkitInfo(); + info.versionMajor = baseInfo.versionMajor; + info.versionMinor = baseInfo.versionMinor; + info.os = baseInfo.os; + info.shortName = _T("msw"); + info.name = _T("wxMSW"); +#ifdef __WXUNIVERSAL__ + info.shortName << _T("univ"); + info.name << _T("/wxUniversal"); +#endif + return info; +} + // =========================================================================== // wxApp implementation // =========================================================================== @@ -857,7 +847,8 @@ void wxApp::OnQueryEndSession(wxCloseEvent& event) /* static */ int wxApp::GetComCtl32Version() { -#if defined(__WXMICROWIN__) || defined(__WXWINCE__) +//FIX ME FOR DIGITALMARS!! +#if defined(__WXMICROWIN__) || defined(__WXWINCE__) || defined(__DIGITALMARS__) return 0; #else // cache the result @@ -880,6 +871,7 @@ int wxApp::GetComCtl32Version() // if so, then we can check for the version if ( dllComCtl32.IsLoaded() ) { +#ifdef DLLVER_PLATFORM_WINDOWS // try to use DllGetVersion() if available in _headers_ wxDYNLIB_FUNCTION( DLLGETVERSIONPROC, DllGetVersion, dllComCtl32 ); if ( pfnDllGetVersion ) @@ -901,6 +893,7 @@ int wxApp::GetComCtl32Version() dvi.dwMinorVersion; } } +#endif // if DllGetVersion() is unavailable either during compile or // run-time, try to guess the version otherwise