// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "treectrl.h"
#endif
#include "wx/msw/treectrl.h"
#include "wx/msw/dragimag.h"
-#ifdef __GNUWIN32_OLD__
- #include "wx/msw/gnuwin32/extra.h"
-#endif
-
-#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
- #include <commctrl.h>
-#endif
-
-// Bug in headers, sometimes
-#ifndef TVIS_FOCUSED
- #define TVIS_FOCUSED 0x0001
-#endif
-
-#ifndef TV_FIRST
- #define TV_FIRST 0x1100
-#endif
-
-#ifndef TVS_CHECKBOXES
- #define TVS_CHECKBOXES 0x0100
-#endif
-
-#ifndef TVS_FULLROWSELECT
- #define TVS_FULLROWSELECT 0x1000
-#endif
-
-// old headers might miss these messages (comctl32.dll 4.71+ only)
-#ifndef TVM_SETBKCOLOR
- #define TVM_SETBKCOLOR (TV_FIRST + 29)
- #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
-#endif
+// include <commctrl.h> "properly"
+#include "wx/msw/wrapcctl.h"
// macros to hide the cast ugliness
// --------------------------------
private:
wxArrayTreeItemIds& m_selections;
+
+ DECLARE_NO_COPY_CLASS(TraverseSelections)
};
// internal class for counting tree items
private:
size_t m_count;
+
+ DECLARE_NO_COPY_CLASS(TraverseCounter)
};
// ----------------------------------------------------------------------------
}
break;
-#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 && !wxUSE_COMCTL32_SAFELY && !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 1, 0 ) )
+ // instead of explicitly checking for _WIN32_IE, check if the
+ // required symbols are available in the headers
+#if defined(CDDS_PREPAINT) && !wxUSE_COMCTL32_SAFELY
case NM_CUSTOMDRAW:
{
LPNMTVCUSTOMDRAW lptvcd = (LPNMTVCUSTOMDRAW)lParam;
// we always process it
return true;
-#endif // _WIN32_IE >= 0x300
+#endif // have owner drawn support in headers
case NM_CLICK:
{