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:
Dimitri Schoolwerth 2004-06-23 22:12:30 +00:00
parent e35594251f
commit dc302518e6

View File

@ -179,8 +179,9 @@ bool wxChoice::MSWShouldPreProcessMessage(WXMSG *pMsg)
{
MSG *msg = (MSG *) pMsg;
// don't preprocess "ESC" if combobox is dropped down
if ( msg->message == WM_KEYDOWN && msg->wParam == VK_ESCAPE )
// if the dropdown list is visible, don't preprocess certain keys
if ( msg->message == WM_KEYDOWN
&& (msg->wParam == VK_ESCAPE || msg->wParam == VK_RETURN) )
{
if (::SendMessage(GetHwndOf(this), CB_GETDROPPEDSTATE, 0, 0))
{