From 72f1a5d605b601fe51dc73cec70279bc49bec34a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 4 Jan 2011 21:33:16 +0000 Subject: [PATCH] Disable wxCompositeWindow<> code for VC6. Revert the attempt to work around VC6 bug from the last commit and simply disable this code completely for VC6, it's not worth the trouble to try to fix it for this compiler. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/compositewin.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/include/wx/compositewin.h b/include/wx/compositewin.h index 9d12ee6fad..785b69f87e 100644 --- a/include/wx/compositewin.h +++ b/include/wx/compositewin.h @@ -18,6 +18,16 @@ // officially stabilized unless you are ready to change it with the next // wxWidgets release. +// FIXME-VC6: This compiler can't compile DoSetForAllParts() template function, +// it can't determine whether the deduced type should be "T" or "const T&". And +// without this function wxCompositeWindow is pretty useless so simply disable +// this code for it, this does mean that setting colours/fonts/... for +// composite controls won't work in the library compiled with it but so far +// this only affects the generic wxDatePickerCtrl which is not used by default +// under MSW anyhow so it doesn't seem to be worth it to spend time and uglify +// the code to fix it. +#ifndef __VISUALC6__ + // ---------------------------------------------------------------------------- // wxCompositeWindow is a helper for implementing composite windows: to define // a class using subwindows, simply inherit from it specialized with the real @@ -90,7 +100,7 @@ private: virtual wxWindowList GetCompositeWindowParts() const = 0; template - void DoSetForAllParts(bool (wxWindowBase::*func)(const T&), T arg) + void DoSetForAllParts(bool (wxWindowBase::*func)(const T&), const T& arg) { // Simply call the setters for all parts of this composite window. const wxWindowList parts = GetCompositeWindowParts(); @@ -107,4 +117,13 @@ private: wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCompositeWindow, W); }; +#else // __VISUALC6__ + +template +class WXDLLIMPEXP_CORE wxCompositeWindow : public W +{ +}; + +#endif // !__VISUALC6__/__VISUALC6__ + #endif // _WX_COMPOSITEWIN_H_ -- 2.45.2