]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 1204244 ] [wxMSW] Use Win2K look (MS Shell Dlg 2) if possible
authorJulian Smart <julian@anthemion.co.uk>
Sun, 22 May 2005 13:04:23 +0000 (13:04 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 22 May 2005 13:04:23 +0000 (13:04 +0000)
Adam Strzelecki

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/font.cpp
src/msw/settings.cpp

index c3ed95c514c06ab5c464ca3983534465b0fa0441..c9f7b35890abc19e053b661beff8ed69ca7625cb 100644 (file)
@@ -606,8 +606,16 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family)
 
         case wxDEFAULT:
         default:
+        {
+            // We want Windows 2000 or later to have new fonts even MS Shell Dlg
+            // is returned as default GUI font for compatibility
+            int verMaj;
             ff_family = FF_SWISS;
-            facename = _T("MS Sans Serif");
+            if(wxGetOsVersion(&verMaj) == wxWINDOWS_NT && verMaj >= 5)
+                facename = _T("MS Shell Dlg 2");
+            else
+                facename = _T("MS Shell Dlg");
+        }
     }
 
     lf.lfPitchAndFamily = (BYTE)(DEFAULT_PITCH) | ff_family;
index af0dfa0adb443dd8d6a62b4b2611e651b4d716ec..602d3f8e6209762ff8574b0f0971fd393ca8686b 100644 (file)
@@ -225,6 +225,12 @@ wxFont wxCreateFontFromStockObject(int index)
         {
             wxNativeFontInfo info;
             info.lf = lf;
+            // We want Windows 2000 or later to have new fonts even MS Shell Dlg
+            // is returned as default GUI font for compatibility
+            int verMaj;
+            if(index == DEFAULT_GUI_FONT && wxGetOsVersion(&verMaj) == wxWINDOWS_NT && verMaj >= 5)
+                wxStrcpy(info.lf.lfFaceName, wxT("MS Shell Dlg 2"));
+
             // Under MicroWindows we pass the HFONT as well
             // because it's hard to convert HFONT -> LOGFONT -> HFONT
             // It's OK to delete stock objects, the delete will be ignored.