]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
Avoid ICE with MinGW 2.95.3.
[wxWidgets.git] / src / msw / combobox.cpp
index 1fd9e0daa577645fcc8d67055ba21c7a62098f72..90f5da5765995ebdcfa0dd02bdee792cda97676a 100644 (file)
@@ -174,6 +174,9 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd,
         case WM_KEYUP:
         case WM_KEYDOWN:
         case WM_CHAR:
         case WM_KEYUP:
         case WM_KEYDOWN:
         case WM_CHAR:
+        case WM_SYSCHAR:
+        case WM_SYSKEYDOWN:
+        case WM_SYSKEYUP:
         case WM_SETFOCUS:
         case WM_KILLFOCUS:
             {
         case WM_SETFOCUS:
         case WM_KILLFOCUS:
             {
@@ -299,12 +302,16 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
                     return true;
                 }
             }
                     return true;
                 }
             }
+            // fall through
 
 
+        case WM_SYSCHAR:
             return HandleChar(wParam, lParam, true /* isASCII */);
 
             return HandleChar(wParam, lParam, true /* isASCII */);
 
+        case WM_SYSKEYDOWN:
         case WM_KEYDOWN:
             return HandleKeyDown(wParam, lParam);
 
         case WM_KEYDOWN:
             return HandleKeyDown(wParam, lParam);
 
+        case WM_SYSKEYUP:
         case WM_KEYUP:
             return HandleKeyUp(wParam, lParam);
 
         case WM_KEYUP:
             return HandleKeyUp(wParam, lParam);
 
@@ -660,11 +667,10 @@ void wxComboBox::SetInsertionPointEnd()
 
 long wxComboBox::GetInsertionPoint() const
 {
 
 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);
     DWORD pos= (DWORD)::SendMessage(GetHwnd(), CB_GETEDITSEL, 0, 0L);
-
-    return HIWORD(pos);
+    return LOWORD(pos);
 }
 
 wxTextPos wxComboBox::GetLastPosition() const
 }
 
 wxTextPos wxComboBox::GetLastPosition() const