X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57bd4c6031d438f11af0ec540136f49a928b923c..658741180583e3219bdd26b83a798cf3c8a59df7:/src/msw/settings.cpp?ds=sidebyside diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index e482e95ff1..476873b4af 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -27,13 +27,13 @@ #include "wx/settings.h" #ifndef WX_PRECOMP - #include "wx/msw/missing.h" // for SM_CXCURSOR, SM_CYCURSOR, SM_TABLETPC #include "wx/utils.h" #include "wx/gdicmn.h" #include "wx/module.h" #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 @@ -352,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 @@ -377,11 +377,14 @@ static const int gs_metricsMap[] = #else -1, #endif + // SM_SWAPBUTTON is not available under CE and it doesn't make sense to ask + // for it there #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 @@ -394,6 +397,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 ) {