Without this, an I-beam cursor is used when a menu is shown by a rich text
control. Set the arrow cursor explicitly to work around this apparent bug in
the native control.
Closes #11314.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62718
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
}
break;
+
+#if wxUSE_MENUS
+ case WM_SETCURSOR:
+ // rich text controls seem to have a bug and don't change the
+ // cursor to the standard arrow one from the I-beam cursor usually
+ // used by them even when a popup menu is shown (this works fine
+ // for plain EDIT controls though), so explicitly work around this
+ if ( IsRich() )
+ {
+ extern wxMenu *wxCurrentPopupMenu;
+ if ( wxCurrentPopupMenu &&
+ wxCurrentPopupMenu->GetInvokingWindow() == this )
+ ::SetCursor(GetHcursorOf(*wxSTANDARD_CURSOR));
+ }
+#endif // wxUSE_MENUS
}
return lRc;