fixed bug #976725: "RETURN closes dialog instead of combobox dropdown" (applied fix suggested in the bug's comment)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -179,8 +179,9 @@ bool wxChoice::MSWShouldPreProcessMessage(WXMSG *pMsg)
|
|||||||
{
|
{
|
||||||
MSG *msg = (MSG *) pMsg;
|
MSG *msg = (MSG *) pMsg;
|
||||||
|
|
||||||
// don't preprocess "ESC" if combobox is dropped down
|
// if the dropdown list is visible, don't preprocess certain keys
|
||||||
if ( msg->message == WM_KEYDOWN && msg->wParam == VK_ESCAPE )
|
if ( msg->message == WM_KEYDOWN
|
||||||
|
&& (msg->wParam == VK_ESCAPE || msg->wParam == VK_RETURN) )
|
||||||
{
|
{
|
||||||
if (::SendMessage(GetHwndOf(this), CB_GETDROPPEDSTATE, 0, 0))
|
if (::SendMessage(GetHwndOf(this), CB_GETDROPPEDSTATE, 0, 0))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user