X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5301d1f7aa068bdfdb57b668f7610a4d603d5f06..3c99602b795292c52aafd12c71cac668ffdbf08f:/src/msw/combobox.cpp?ds=sidebyside diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 1fd9e0daa5..90f5da5765 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -174,6 +174,9 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd, case WM_KEYUP: case WM_KEYDOWN: case WM_CHAR: + case WM_SYSCHAR: + case WM_SYSKEYDOWN: + case WM_SYSKEYUP: case WM_SETFOCUS: case WM_KILLFOCUS: { @@ -299,12 +302,16 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam) return true; } } + // fall through + case WM_SYSCHAR: return HandleChar(wParam, lParam, true /* isASCII */); + case WM_SYSKEYDOWN: case WM_KEYDOWN: return HandleKeyDown(wParam, lParam); + case WM_SYSKEYUP: case WM_KEYUP: return HandleKeyUp(wParam, lParam); @@ -660,11 +667,10 @@ void wxComboBox::SetInsertionPointEnd() long wxComboBox::GetInsertionPoint() const { - // CB_GETEDITSEL returns the index of the last character after selection in - // its high-order word + // CB_GETEDITSEL returns the index of the first character of the selection in + // its low-order word DWORD pos= (DWORD)::SendMessage(GetHwnd(), CB_GETEDITSEL, 0, 0L); - - return HIWORD(pos); + return LOWORD(pos); } wxTextPos wxComboBox::GetLastPosition() const