From 26d863e2b2f30612d0512a786fc01fe63c6b7bdf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 20 Oct 2011 16:20:19 +0000 Subject: [PATCH] Fix wxRichToolTip compilation under MSW without PCH and recent SDK headers. Include the headers normally included from wx/wxprec.h. Also define the stuff missing from the headers of some compilers (notably MinGW but probably also VC6) ourselves. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/private/richtooltip.h | 3 +++ src/msw/richtooltip.cpp | 27 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/include/wx/generic/private/richtooltip.h b/include/wx/generic/private/richtooltip.h index baaf273011..3730638592 100644 --- a/include/wx/generic/private/richtooltip.h +++ b/include/wx/generic/private/richtooltip.h @@ -11,6 +11,9 @@ #ifndef _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_ #define _GENERIC_PRIVATE_RICHTOOLTIP_H_ +#include "wx/icon.h" +#include "wx/colour.h" + // ---------------------------------------------------------------------------- // wxRichToolTipGenericImpl: defines generic wxRichToolTip implementation. // ---------------------------------------------------------------------------- diff --git a/src/msw/richtooltip.cpp b/src/msw/richtooltip.cpp index 1736eb0324..5751118153 100644 --- a/src/msw/richtooltip.cpp +++ b/src/msw/richtooltip.cpp @@ -26,6 +26,7 @@ #if wxUSE_RICHTOOLTIP #ifndef WX_PRECOMP + #include "wx/treectrl.h" #endif // WX_PRECOMP #include "wx/private/richtooltip.h" @@ -33,6 +34,32 @@ #include "wx/msw/private.h" #include "wx/msw/uxtheme.h" +// Provide definitions missing from some compilers SDK headers. + +#ifndef TTI_NONE +enum +{ + TTI_NONE, + TTI_INFO, + TTI_WARNING, + TTI_ERROR +}; +#endif // !defined(TTI_XXX) + +#ifndef Edit_ShowBalloonTip +struct EDITBALLOONTIP +{ + DWORD cbStruct; + LPCWSTR pszTitle; + LPCWSTR pszText; + int ttiIcon; +}; + +#define Edit_ShowBalloonTip(hwnd, pebt) \ + (BOOL)::SendMessage((hwnd), 0x1503 /* EM_SHOWBALLOONTIP */, 0, (LPARAM)(pebt)) + +#endif // !defined(Edit_ShowBalloonTip) + // ============================================================================ // wxRichToolTipMSWImpl: the real implementation. // ============================================================================ -- 2.45.2