From 8cbf7a0919f81de442580df1fe0229bb7b5f480a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 25 Jun 2014 18:04:59 +0000 Subject: [PATCH] Fix IRichEditOleCallback compilation with MinGW. MinGW headers declare the IRichEditOleCallback interface and the corresponding IID, but the libraries don't contain the latter symbol. Work around it by defining it ourselves. Fixes #16340. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textctrl.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 716dc23cb8..df2e09cb55 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -92,6 +92,25 @@ static wxDropTarget * #endif // wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT +#if wxUSE_OLE +// This must be the last header included to only affect the DEFINE_GUID() +// occurrences below but not any GUIDs declared in the standard files included +// above. +#include + +namespace +{ + +// Normally the IRichEditOleCallback interface and its IID are defined in +// richole.h header file included in the platform SDK but MinGW doesn't +// have the IID symbol (but does have the interface). Work around it by +// defining it ourselves. +DEFINE_GUID(wxIID_IRichEditOleCallback, + 0x00020d03, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); + +} // anonymous namespace +#endif // wxUSE_OLE + // ---------------------------------------------------------------------------- // private classes // ---------------------------------------------------------------------------- @@ -200,7 +219,7 @@ private: BEGIN_IID_TABLE(wxTextCtrlOleCallback) ADD_IID(Unknown) - ADD_IID(RichEditOleCallback) + ADD_RAW_IID(wxIID_IRichEditOleCallback) END_IID_TABLE; IMPLEMENT_IUNKNOWN_METHODS(wxTextCtrlOleCallback)