]> git.saurik.com Git - wxWidgets.git/commitdiff
return begining of the selection for GetInsertionPoint to match what
authorRobin Dunn <robin@alldunn.com>
Mon, 11 Apr 2005 20:42:59 +0000 (20:42 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 11 Apr 2005 20:42:59 +0000 (20:42 +0000)
wxTextCtrl does.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/combobox.cpp

index c15da2ee31ba9e918c050c277e1374e262c972c8..90f5da5765995ebdcfa0dd02bdee792cda97676a 100644 (file)
@@ -667,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