From bdf5ba03ed75050c75d6adf3a443f6612d0c1821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 25 Jun 2014 18:01:56 +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/trunk@76771 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 ee20e3f8ae..936bd955d1 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -79,6 +79,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 // ---------------------------------------------------------------------------- @@ -187,7 +206,7 @@ private: BEGIN_IID_TABLE(wxTextCtrlOleCallback) ADD_IID(Unknown) - ADD_IID(RichEditOleCallback) + ADD_RAW_IID(wxIID_IRichEditOleCallback) END_IID_TABLE; IMPLEMENT_IUNKNOWN_METHODS(wxTextCtrlOleCallback)