Apply [ 1713345 ] combobox: cmd accelerators shouldn't steal editing hotkeys
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -105,6 +105,7 @@ public:
|
|||||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||||
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
|
bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||||
|
bool MSWShouldPreProcessMessage(WXMSG *pMsg);
|
||||||
|
|
||||||
WXHWND GetEditHWND() const;
|
WXHWND GetEditHWND() const;
|
||||||
|
|
||||||
|
@@ -367,6 +367,30 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxComboBox::MSWShouldPreProcessMessage(WXMSG *pMsg)
|
||||||
|
{
|
||||||
|
// prevent command accelerators from stealing editing
|
||||||
|
// hotkeys when we have the focus
|
||||||
|
if (wxIsCtrlDown())
|
||||||
|
{
|
||||||
|
WPARAM vkey = pMsg->wParam;
|
||||||
|
|
||||||
|
switch (vkey)
|
||||||
|
{
|
||||||
|
case 'C':
|
||||||
|
case 'V':
|
||||||
|
case 'X':
|
||||||
|
case VK_INSERT:
|
||||||
|
case VK_DELETE:
|
||||||
|
case VK_HOME:
|
||||||
|
case VK_END:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxChoice::MSWShouldPreProcessMessage(pMsg);
|
||||||
|
}
|
||||||
|
|
||||||
WXHWND wxComboBox::GetEditHWND() const
|
WXHWND wxComboBox::GetEditHWND() const
|
||||||
{
|
{
|
||||||
// this function should not be called for wxCB_READONLY controls, it is
|
// this function should not be called for wxCB_READONLY controls, it is
|
||||||
|
Reference in New Issue
Block a user