X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..9869734d0431a29732006119f2d4ed35af70ca9b:/src/msw/settings.cpp diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 1de9962cee..e81d059ce0 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -49,7 +49,7 @@ wxColour wxSystemSettings::GetSystemColour(int index) wxFont wxSystemSettings::GetSystemFont(int index) { HFONT hFont = (HFONT) ::GetStockObject(index); - if ( hFont != NULL ) + if ( hFont != (HFONT) NULL ) { LOGFONT lf; if ( ::GetObject(hFont, sizeof(LOGFONT), &lf) != 0 ) @@ -90,7 +90,7 @@ int wxSystemSettings::GetSystemMetric(int index) return ::GetSystemMetrics(SM_CXDOUBLECLK); case wxSYS_DCLICK_Y: return ::GetSystemMetrics(SM_CYDOUBLECLK); -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(SM_CXDRAG) case wxSYS_DRAG_X: return ::GetSystemMetrics(SM_CXDRAG); case wxSYS_DRAG_Y: @@ -122,7 +122,8 @@ int wxSystemSettings::GetSystemMetric(int index) return ::GetSystemMetrics(SM_CXSCREEN); case wxSYS_SCREEN_Y: return ::GetSystemMetrics(SM_CYSCREEN); -#ifdef __WIN32__ + +#if defined(__WIN32__) && defined(SM_CXSIZEFRAME) case wxSYS_FRAMESIZE_X: return ::GetSystemMetrics(SM_CXSIZEFRAME); case wxSYS_FRAMESIZE_Y: @@ -146,13 +147,13 @@ int wxSystemSettings::GetSystemMetric(int index) return ::GetSystemMetrics(SM_CYCAPTION); case wxSYS_MENU_Y: return ::GetSystemMetrics(SM_CYMENU); -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(SM_NETWORK) case wxSYS_NETWORK_PRESENT: return ::GetSystemMetrics(SM_NETWORK) & 0x0001; #endif case wxSYS_PENWINDOWS_PRESENT: return ::GetSystemMetrics(SM_PENWINDOWS); -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(SM_SHOWSOUNDS) case wxSYS_SHOW_SOUNDS: return ::GetSystemMetrics(SM_SHOWSOUNDS); #endif