]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/settings.cpp
fix off by one (or rather "off by border width") bug in ScrollWindow() (part of patch...
[wxWidgets.git] / src / msw / settings.cpp
index 9817d4d7c1e96b813ad0ce9c179ed4b28939535b..7601841a0cdb201b8eea523e44177c664f87c9a1 100644 (file)
@@ -33,6 +33,7 @@
 #endif
 
 #include "wx/msw/private.h"
+#include "wx/msw/missing.h" // for SM_CXCURSOR, SM_CYCURSOR, SM_TABLETPC
 
 #ifndef SPI_GETFLATMENU
 #define SPI_GETFLATMENU                     0x1022
@@ -40,9 +41,6 @@
 
 #include "wx/fontutil.h"
 
-// for SM_CXCURSOR, SM_CYCURSOR, SM_TABLETPC
-#include "wx/msw/missing.h"
-
 // ----------------------------------------------------------------------------
 // private classes
 // ----------------------------------------------------------------------------
@@ -354,7 +352,7 @@ static const int gs_metricsMap[] =
     -1, -1, -1, -1,
 #endif
     SM_CYHSCROLL,
-    SM_CXVSCROLL,
+    SM_CXHSCROLL,
     SM_CXVSCROLL,
     SM_CYVSCROLL,
 #ifdef SM_CYVTHUMB
@@ -382,8 +380,9 @@ static const int gs_metricsMap[] =
 #ifdef SM_SWAPBUTTON
     SM_SWAPBUTTON,
 #else
-    -1
+    -1,
 #endif
+    -1   // wxSYS_DCLICK_MSEC - not available as system metric
 };
 
 // Get a system metric, e.g. scrollbar size
@@ -396,6 +395,12 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(w
     wxCHECK_MSG( index > 0 && (size_t)index < WXSIZEOF(gs_metricsMap), 0,
                  _T("invalid metric") );
 
+    if ( index == wxSYS_DCLICK_MSEC )
+    {
+        // This one is not a Win32 system metric
+        return ::GetDoubleClickTime();
+    }
+
     int indexMSW = gs_metricsMap[index];
     if ( indexMSW == -1 )
     {