diff --git a/include/wx/msw/checkbox.h b/include/wx/msw/checkbox.h index bc2eaf460b..7370ad6f11 100644 --- a/include/wx/msw/checkbox.h +++ b/include/wx/msw/checkbox.h @@ -13,13 +13,6 @@ #include "wx/msw/ownerdrawnbutton.h" -#ifdef __VISUALC__ - // Disable the warning about non DLL-exported wxMSWOwnerDrawnButton class - // used as base for DLL-exported class: it's harmless in this case. - #pragma warning(push) - #pragma warning(disable:4275) -#endif - // Checkbox item (single checkbox) class WXDLLIMPEXP_CORE wxCheckBox : public wxMSWOwnerDrawnButton { @@ -84,8 +77,4 @@ private: DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckBox) }; -#ifdef __VISUALC__ - #pragma warning(pop) -#endif - #endif // _WX_CHECKBOX_H_ diff --git a/include/wx/msw/ownerdrawnbutton.h b/include/wx/msw/ownerdrawnbutton.h index 527a9c2529..99843e62af 100644 --- a/include/wx/msw/ownerdrawnbutton.h +++ b/include/wx/msw/ownerdrawnbutton.h @@ -17,11 +17,11 @@ // This class contains the type-independent part of wxMSWOwnerDrawnButton and // is implemented in src/msw/control.cpp. // -// Notice that it is intentionally not DLL-exported, it is internal -// implementation detail only. However MSVS generates a warning C4275 when -// deriving from the non-exported classes, so it needs to be explicitly -// disabled when deriving from this one. -class wxMSWOwnerDrawnButtonBase +// Notice that this class is internal implementation detail only and is +// intentionally not documented. Ideally it wouldn't be even exported from the +// DLL but this somehow breaks building of applications using wxWidgets with +// Intel compiler using LTCG, so we do export it. +class WXDLLIMPEXP_CORE wxMSWOwnerDrawnButtonBase { protected: // Ctor takes the back pointer to the real window, must be non-NULL. @@ -91,8 +91,9 @@ private: // This class uses a weak version of CRTP, i.e. it's a template class taking // the base class that the class deriving from it would normally derive from. template -class wxMSWOwnerDrawnButton : public T, - private wxMSWOwnerDrawnButtonBase +class WXDLLIMPEXP_CORE wxMSWOwnerDrawnButton + : public T, + private wxMSWOwnerDrawnButtonBase { private: typedef T Base; diff --git a/include/wx/msw/radiobut.h b/include/wx/msw/radiobut.h index a7da5f3f7d..76fc661b9c 100644 --- a/include/wx/msw/radiobut.h +++ b/include/wx/msw/radiobut.h @@ -13,13 +13,6 @@ #include "wx/msw/ownerdrawnbutton.h" -#ifdef __VISUALC__ - // Disable the warning about non DLL-exported wxMSWOwnerDrawnButton class - // used as base for DLL-exported class: it's harmless in this case. - #pragma warning(push) - #pragma warning(disable:4275) -#endif - class WXDLLIMPEXP_CORE wxRadioButton : public wxMSWOwnerDrawnButton { public: @@ -85,8 +78,4 @@ private: DECLARE_DYNAMIC_CLASS_NO_COPY(wxRadioButton) }; -#ifdef __VISUALC__ - #pragma warning(pop) -#endif - #endif // _WX_RADIOBUT_H_