Explicitly set the cursor when showing popup menu on text control in wxMSW.
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
This commit is contained in:
@@ -1928,6 +1928,21 @@ WXLRESULT wxTextCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
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;
|
return lRc;
|
||||||
|
Reference in New Issue
Block a user