diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 910a96979e..d205f7e6ef 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -92,10 +92,6 @@ typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *); #endif // defined(DLLVERSIONINFO) -#ifndef ATTACH_PARENT_PROCESS - #define ATTACH_PARENT_PROCESS ((DWORD)-1) -#endif - // --------------------------------------------------------------------------- // global variables // --------------------------------------------------------------------------- diff --git a/src/msw/datectrl.cpp b/src/msw/datectrl.cpp index d21cb60ef0..a7d20ac984 100644 --- a/src/msw/datectrl.cpp +++ b/src/msw/datectrl.cpp @@ -74,11 +74,9 @@ WXDWORD wxDatePickerCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const styleMSW |= DTS_UPDOWN; //else: drop down by default -#ifdef DTS_SHORTDATECENTURYFORMAT if ( style & wxDP_SHOWCENTURY ) styleMSW |= DTS_SHORTDATECENTURYFORMAT; else -#endif // DTS_SHORTDATECENTURYFORMAT styleMSW |= DTS_SHORTDATEFORMAT; if ( style & wxDP_ALLOWNONE ) diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 551377e88f..404c86735b 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -79,14 +79,6 @@ using namespace wxMSWImpl; -#ifndef AC_SRC_ALPHA - #define AC_SRC_ALPHA 1 -#endif - -#ifndef LAYOUT_RTL - #define LAYOUT_RTL 1 -#endif - /* Quaternary raster codes */ #ifndef MAKEROP4 #define MAKEROP4(fore,back) (DWORD)((((back) << 8) & 0xFF000000) | (fore)) diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index e40f73f9eb..5ff78e7c7e 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -57,14 +57,6 @@ wxDEFINE_EVENT( wxEVT_DIALUP_DISCONNECTED, wxDialUpEvent ); #include -// Not in VC++ 5 -#ifndef INTERNET_CONNECTION_LAN -#define INTERNET_CONNECTION_LAN 2 -#endif -#ifndef INTERNET_CONNECTION_PROXY -#define INTERNET_CONNECTION_PROXY 4 -#endif - static const wxChar * wxMSWDIALUP_WNDCLASSNAME = wxT("_wxDialUpManager_Internal_Class"); static const wxChar *gs_classForDialUpWindow = NULL; diff --git a/src/msw/dirdlg.cpp b/src/msw/dirdlg.cpp index a2bffb09ba..84557d7c95 100644 --- a/src/msw/dirdlg.cpp +++ b/src/msw/dirdlg.cpp @@ -147,18 +147,10 @@ DEFINE_GUID(IID_IFileDialog, // constants // ---------------------------------------------------------------------------- -#ifndef BIF_NEWDIALOGSTYLE - #define BIF_NEWDIALOGSTYLE 0x0040 -#endif - #ifndef BIF_NONEWFOLDERBUTTON #define BIF_NONEWFOLDERBUTTON 0x0200 #endif -#ifndef BIF_EDITBOX - #define BIF_EDITBOX 16 -#endif - // ---------------------------------------------------------------------------- // wxWidgets macros // ---------------------------------------------------------------------------- @@ -459,7 +451,6 @@ BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) { switch(uMsg) { -#ifdef BFFM_SETSELECTION case BFFM_INITIALIZED: // sent immediately after initialisation and so we may set the // initial selection here @@ -467,8 +458,6 @@ BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) // wParam = TRUE => lParam is a string and not a PIDL ::SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData); break; -#endif // BFFM_SETSELECTION - case BFFM_SELCHANGED: // note that this doesn't work with the new style UI (MSDN doesn't diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index 867ed0455b..85a56001df 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -334,14 +334,8 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS #else if (!m_hCursorImageList) { -#ifndef SM_CXCURSOR - // Smartphone may not have these metric symbol - int cxCursor = 16; - int cyCursor = 16; -#else int cxCursor = ::GetSystemMetrics(SM_CXCURSOR); int cyCursor = ::GetSystemMetrics(SM_CYCURSOR); -#endif m_hCursorImageList = (WXHIMAGELIST) ImageList_Create(cxCursor, cyCursor, ILC_MASK, 1, 1); } diff --git a/src/msw/fontutil.cpp b/src/msw/fontutil.cpp index 97b9e7edbb..faae55ff18 100644 --- a/src/msw/fontutil.cpp +++ b/src/msw/fontutil.cpp @@ -37,11 +37,6 @@ #include "wx/fontmap.h" #include "wx/tokenzr.h" -// for MSVC5 and old w32api -#ifndef HANGUL_CHARSET -# define HANGUL_CHARSET 129 -#endif - // ============================================================================ // implementation // ============================================================================ diff --git a/src/msw/gauge.cpp b/src/msw/gauge.cpp index 78d298ebc6..67fb5b8a63 100644 --- a/src/msw/gauge.cpp +++ b/src/msw/gauge.cpp @@ -40,15 +40,6 @@ // constants // ---------------------------------------------------------------------------- -// old commctrl.h (< 4.71) don't have those -#ifndef PBS_SMOOTH - #define PBS_SMOOTH 0x01 -#endif - -#ifndef PBS_VERTICAL - #define PBS_VERTICAL 0x04 -#endif - #ifndef PBM_SETBARCOLOR #define PBM_SETBARCOLOR (WM_USER+9) #endif diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 6022b8f679..c7790aeacd 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -50,13 +50,6 @@ #include "wx/dynlib.h" -#ifndef MNS_CHECKORBMP - #define MNS_CHECKORBMP 0x04000000 -#endif -#ifndef MIM_STYLE - #define MIM_STYLE 0x00000010 -#endif - // ---------------------------------------------------------------------------- // global variables // ---------------------------------------------------------------------------- diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index 98bc39413e..b294c795f3 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -143,10 +143,6 @@ inline bool IsGreaterThanStdSize(const wxBitmap& bmp) #include "wx/fontutil.h" #include "wx/msw/private/metrics.h" -#ifndef SPI_GETKEYBOARDCUES -#define SPI_GETKEYBOARDCUES 0x100A -#endif - #if wxUSE_UXTHEME enum MENUPARTS diff --git a/src/msw/ole/access.cpp b/src/msw/ole/access.cpp index e1812f2cc5..fd06b3043f 100644 --- a/src/msw/ole/access.cpp +++ b/src/msw/ole/access.cpp @@ -39,10 +39,6 @@ #include "wx/msw/ole/oleutils.h" -#ifndef CHILDID_SELF -#define CHILDID_SELF 0 -#endif - #ifndef OBJID_CLIENT #define OBJID_CLIENT 0xFFFFFFFC #endif diff --git a/src/msw/ole/oleutils.cpp b/src/msw/ole/oleutils.cpp index c0a173a639..57a19fc1a4 100644 --- a/src/msw/ole/oleutils.cpp +++ b/src/msw/ole/oleutils.cpp @@ -393,10 +393,6 @@ WXDLLEXPORT bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& ole return true; } -#ifndef VT_TYPEMASK -#define VT_TYPEMASK 0xfff -#endif - WXDLLEXPORT bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant, long flags) { diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index 82825ed324..aef56fdec2 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -49,18 +49,6 @@ typedef unsigned char *RegString; typedef BYTE* RegBinary; -#ifndef HKEY_PERFORMANCE_DATA // (Obsolete under XP and later) - #define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004) -#endif - -#ifndef HKEY_CURRENT_CONFIG - #define HKEY_CURRENT_CONFIG ((HKEY)0x80000005) -#endif - -#ifndef HKEY_DYN_DATA // (Obsolete under XP and later) - #define HKEY_DYN_DATA ((HKEY)0x80000006) -#endif - #ifndef KEY_WOW64_64KEY #define KEY_WOW64_64KEY 0x0100 #endif @@ -939,10 +927,6 @@ bool wxRegKey::QueryValue(const wxString& szValue, long *plValue) const bool wxRegKey::SetValue(const wxString& szValue, const wxMemoryBuffer& buffer) { -#ifdef __TWIN32__ - wxFAIL_MSG("RegSetValueEx not implemented by TWIN32"); - return false; -#else if ( CONST_CAST Open() ) { m_dwLastError = RegSetValueEx((HKEY) m_hKey, RegValueStr(szValue), (DWORD) RESERVED, REG_BINARY, @@ -954,7 +938,6 @@ bool wxRegKey::SetValue(const wxString& szValue, const wxMemoryBuffer& buffer) wxLogSysError(m_dwLastError, _("Can't set value of '%s'"), GetFullName(this, szValue)); return false; -#endif } bool wxRegKey::QueryValue(const wxString& szValue, wxMemoryBuffer& buffer) const diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp index 8889507d2a..64eaff0ed9 100644 --- a/src/msw/renderer.cpp +++ b/src/msw/renderer.cpp @@ -126,10 +126,6 @@ #define TDLGEBS_EXPANDEDPRESSED 6 #endif -#ifndef DFCS_HOT - #define DFCS_HOT 0x1000 -#endif - // ---------------------------------------------------------------------------- // methods common to wxRendererMSW and wxRendererXP // ---------------------------------------------------------------------------- diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 55cf5c6cea..e1aef8efbe 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -35,10 +35,6 @@ #include "wx/msw/missing.h" // for SM_CXCURSOR, SM_CYCURSOR, SM_TABLETPC #include "wx/msw/private/metrics.h" -#ifndef SPI_GETFLATMENU -#define SPI_GETFLATMENU 0x1022 -#endif - #include "wx/fontutil.h" #include "wx/fontenum.h" @@ -223,83 +219,41 @@ static const int gs_metricsMap[] = SM_CXBORDER, SM_CYBORDER, -#ifdef SM_CXCURSOR SM_CXCURSOR, SM_CYCURSOR, -#else - -1, -1, -#endif SM_CXDOUBLECLK, SM_CYDOUBLECLK, -#if defined(SM_CXDRAG) SM_CXDRAG, SM_CYDRAG, SM_CXEDGE, SM_CYEDGE, -#else - -1, -1, -1, -1, -#endif SM_CXHSCROLL, SM_CYHSCROLL, -#ifdef SM_CXHTHUMB SM_CXHTHUMB, -#else - -1, -#endif SM_CXICON, SM_CYICON, SM_CXICONSPACING, SM_CYICONSPACING, -#ifdef SM_CXHTHUMB SM_CXMIN, SM_CYMIN, -#else - -1, -1, -#endif SM_CXSCREEN, SM_CYSCREEN, -#if defined(SM_CXSIZEFRAME) SM_CXSIZEFRAME, SM_CYSIZEFRAME, SM_CXSMICON, SM_CYSMICON, -#else - -1, -1, -1, -1, -#endif SM_CYHSCROLL, SM_CXHSCROLL, SM_CXVSCROLL, SM_CYVSCROLL, -#ifdef SM_CYVTHUMB SM_CYVTHUMB, -#else - -1, -#endif SM_CYCAPTION, SM_CYMENU, -#if defined(SM_NETWORK) SM_NETWORK, -#else - -1, -#endif -#ifdef SM_PENWINDOWS SM_PENWINDOWS, -#else - -1, -#endif -#if defined(SM_SHOWSOUNDS) SM_SHOWSOUNDS, -#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, -#endif -1 // wxSYS_DCLICK_MSEC - not available as system metric }; diff --git a/src/msw/stdpaths.cpp b/src/msw/stdpaths.cpp index 29aa6b9192..edc1517e66 100644 --- a/src/msw/stdpaths.cpp +++ b/src/msw/stdpaths.cpp @@ -51,34 +51,10 @@ typedef HRESULT (WINAPI *SHGetKnownFolderPath_t)(const GUID&, DWORD, HANDLE, PWS // used in our wxLogTrace messages #define TRACE_MASK wxT("stdpaths") -#ifndef CSIDL_APPDATA - #define CSIDL_APPDATA 0x001a -#endif - -#ifndef CSIDL_LOCAL_APPDATA - #define CSIDL_LOCAL_APPDATA 0x001c -#endif - -#ifndef CSIDL_COMMON_APPDATA - #define CSIDL_COMMON_APPDATA 0x0023 -#endif - -#ifndef CSIDL_PROGRAM_FILES - #define CSIDL_PROGRAM_FILES 0x0026 -#endif - #ifndef CSIDL_PERSONAL #define CSIDL_PERSONAL 0x0005 #endif -#ifndef SHGFP_TYPE_CURRENT - #define SHGFP_TYPE_CURRENT 0 -#endif - -#ifndef SHGFP_TYPE_DEFAULT - #define SHGFP_TYPE_DEFAULT 1 -#endif - // ---------------------------------------------------------------------------- // module globals // ---------------------------------------------------------------------------- diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index 7b61f25e60..22583439bf 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -38,22 +38,6 @@ #define NIN_BALLOONUSERCLICK 0x0405 #endif -#ifndef NIM_SETVERSION - #define NIM_SETVERSION 0x00000004 -#endif - -#ifndef NIF_INFO - #define NIF_INFO 0x00000010 -#endif - -#ifndef NOTIFYICONDATA_V2_SIZE - #ifdef UNICODE - #define NOTIFYICONDATA_V2_SIZE 0x03A8 - #else - #define NOTIFYICONDATA_V2_SIZE 0x01E8 - #endif -#endif - // initialized on demand static UINT gs_msgTaskbar = 0; static UINT gs_msgRestartTaskbar = 0; diff --git a/src/msw/textentry.cpp b/src/msw/textentry.cpp index 3a36a69abd..cd33b0c120 100644 --- a/src/msw/textentry.cpp +++ b/src/msw/textentry.cpp @@ -66,10 +66,6 @@ #endif #endif -#ifndef ACO_UPDOWNKEYDROPSLIST - #define ACO_UPDOWNKEYDROPSLIST 0x20 -#endif - #ifndef SHACF_FILESYS_ONLY #define SHACF_FILESYS_ONLY 0x00000010 #endif diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 4a6e8078f7..ba880caae6 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -47,14 +47,6 @@ #include "wx/display.h" -#ifndef ICON_BIG - #define ICON_BIG 1 -#endif - -#ifndef ICON_SMALL - #define ICON_SMALL 0 -#endif - // NB: wxDlgProc must be defined here and not in dialog.cpp because the latter // is not included by wxUniv build which does need wxDlgProc LONG APIENTRY diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 7534a69cb0..61d86df378 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -121,27 +121,10 @@ #define ETS_ASSIST 7 #endif -// define the constants used by AnimateWindow() if our SDK doesn't have them -#ifndef AW_CENTER - #define AW_HOR_POSITIVE 0x00000001 - #define AW_HOR_NEGATIVE 0x00000002 - #define AW_VER_POSITIVE 0x00000004 - #define AW_VER_NEGATIVE 0x00000008 - #define AW_CENTER 0x00000010 - #define AW_HIDE 0x00010000 - #define AW_ACTIVATE 0x00020000 - #define AW_SLIDE 0x00040000 - #define AW_BLEND 0x00080000 -#endif - -#if defined(TME_LEAVE) && defined(WM_MOUSELEAVE) && wxUSE_DYNLIB_CLASS +#if wxUSE_DYNLIB_CLASS #define HAVE_TRACKMOUSEEVENT #endif // everything needed for TrackMouseEvent() -#ifndef MAPVK_VK_TO_CHAR - #define MAPVK_VK_TO_CHAR 2 -#endif - // --------------------------------------------------------------------------- // global variables // --------------------------------------------------------------------------- @@ -2933,7 +2916,6 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result, } break; -#ifdef MM_JOY1MOVE case MM_JOY1MOVE: case MM_JOY2MOVE: case MM_JOY1ZMOVE: @@ -2947,7 +2929,6 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result, HIWORD(lParam), wParam); break; -#endif // MM_JOY1MOVE case WM_COMMAND: { @@ -3064,13 +3045,11 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result, case VK_OEM_PERIOD: break; -#ifdef VK_APPS // special case of VK_APPS: treat it the same as right mouse // click because both usually pop up a context menu case VK_APPS: processed = HandleMouseEvent(WM_RBUTTONDOWN, -1, -1, 0); break; -#endif // VK_APPS default: if ( (wParam >= '0' && wParam <= '9') || @@ -3107,14 +3086,12 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result, case WM_SYSKEYUP: case WM_KEYUP: -#ifdef VK_APPS // special case of VK_APPS: treat it the same as right mouse button if ( wParam == VK_APPS ) { processed = HandleMouseEvent(WM_RBUTTONUP, -1, -1, 0); } else -#endif // VK_APPS { processed = HandleKeyUp((WORD) wParam, lParam); } @@ -3864,7 +3841,6 @@ bool wxWindowMSW::MSWOnNotify(int WXUNUSED(idCtrl), bool wxWindowMSW::HandleQueryEndSession(long logOff, bool *mayEnd) { -#ifdef ENDSESSION_LOGOFF wxCloseEvent event(wxEVT_QUERY_END_SESSION, wxID_ANY); event.SetEventObject(wxTheApp); event.SetCanVeto(true); @@ -3880,16 +3856,10 @@ bool wxWindowMSW::HandleQueryEndSession(long logOff, bool *mayEnd) } return rc; -#else - wxUnusedVar(logOff); - wxUnusedVar(mayEnd); - return false; -#endif } bool wxWindowMSW::HandleEndSession(bool endSession, long logOff) { -#ifdef ENDSESSION_LOGOFF // do nothing if the session isn't ending if ( !endSession ) return false; @@ -3904,11 +3874,6 @@ bool wxWindowMSW::HandleEndSession(bool endSession, long logOff) event.SetLoggingOff((logOff & ENDSESSION_LOGOFF) != 0); return wxTheApp->ProcessEvent(event); -#else - wxUnusedVar(endSession); - wxUnusedVar(logOff); - return false; -#endif } // --------------------------------------------------------------------------- @@ -4222,9 +4187,7 @@ bool wxWindowMSW::HandlePower(WXWPARAM wParam, case PBT_APMPOWERSTATUSCHANGE: case PBT_APMOEMEVENT: case PBT_APMRESUMECRITICAL: -#ifdef PBT_APMRESUMEAUTOMATIC case PBT_APMRESUMEAUTOMATIC: -#endif evtType = wxEVT_NULL; break; } @@ -5757,7 +5720,6 @@ bool wxWindowMSW::HandleClipboardEvent(WXUINT nMsg) bool wxWindowMSW::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags) { -#ifdef JOY_BUTTON1 int change = 0; if ( flags & JOY_BUTTON1CHG ) change = wxJOY_BUTTON1; @@ -5837,13 +5799,6 @@ bool wxWindowMSW::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags) event.SetEventObject(this); return HandleWindowEvent(event); -#else - wxUnusedVar(msg); - wxUnusedVar(x); - wxUnusedVar(y); - wxUnusedVar(flags); - return false; -#endif } // --------------------------------------------------------------------------- @@ -6074,11 +6029,9 @@ const struct wxKeyMapping { VK_NUMLOCK, WXK_NUMLOCK }, { VK_SCROLL, WXK_SCROLL }, -#ifdef VK_APPS { VK_LWIN, WXK_WINDOWS_LEFT }, { VK_RWIN, WXK_WINDOWS_RIGHT }, { VK_APPS, WXK_WINDOWS_MENU }, -#endif // VK_APPS defined { VK_BROWSER_BACK, WXK_BROWSER_BACK }, { VK_BROWSER_FORWARD, WXK_BROWSER_FORWARD }, @@ -6349,8 +6302,6 @@ WXWORD WXToVK(int wxk, bool *isExtended) // small helper for wxGetKeyState() and wxGetMouseState() static inline bool wxIsKeyDown(WXWORD vk) { - // SM_SWAPBUTTON is not available under CE, so don't swap buttons there -#ifdef SM_SWAPBUTTON if ( vk == VK_LBUTTON || vk == VK_RBUTTON ) { if ( ::GetSystemMetrics(SM_SWAPBUTTON) ) @@ -6361,7 +6312,6 @@ static inline bool wxIsKeyDown(WXWORD vk) vk = VK_LBUTTON; } } -#endif // SM_SWAPBUTTON // the low order bit indicates whether the key was pressed since the last // call and the high order one indicates whether it is down right now and