From 2b026e02e80389c804210ed004f60fb7db03fa73 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 4 Apr 2017 15:27:05 +0200 Subject: [PATCH] Only declare wxTextCtrl::MSWCreateContextMenu() if wxUSE_RICHEDIT==1 This method is only used, and defined, when using rich edit controls, so don't declare it if wxUSE_RICHEDIT==0. This should fix a link error in this build variant. Closes https://github.com/wxWidgets/wxWidgets/pull/452 --- include/wx/msw/textctrl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index e75181dec0..a3d5870532 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -171,10 +171,12 @@ public: // EDIT control has one already) void OnContextMenu(wxContextMenuEvent& event); +#if wxUSE_RICHEDIT // Create context menu for RICHEDIT controls. This may be called once during // the control's lifetime or every time the menu is shown, depending on // implementation. virtual wxMenu *MSWCreateContextMenu(); +#endif // wxUSE_RICHEDIT // be sure the caret remains invisible if the user // called HideNativeCaret() before