]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combobox.cpp
define wxDateEvent static stuff here
[wxWidgets.git] / src / msw / combobox.cpp
index a9bb62cb5eb9ecbf4b996e7e51e7b902e79d4c80..c8ccafc1a54dca18b46b275c2ee3ad6bc7059d65 100644 (file)
@@ -347,6 +347,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
                 if ( sel == -1 )
                 {
                     m_value = wxGetWindowText(GetHwnd());
+                    m_selectionOld = -1;
                 }
                 else // we're synthesizing text updated event from sel change
                 {
@@ -619,7 +620,7 @@ void wxComboBox::SetInsertionPointEnd()
     // setting insertion point doesn't make sense for read only comboboxes
     if ( !(GetWindowStyle() & wxCB_READONLY) )
     {
-        long pos = GetLastPosition();
+        wxTextPos pos = GetLastPosition();
         SetInsertionPoint(pos);
     }
 }
@@ -634,15 +635,15 @@ long wxComboBox::GetInsertionPoint() const
 #endif
 }
 
-long wxComboBox::GetLastPosition() const
+wxTextPos wxComboBox::GetLastPosition() const
 {
     HWND hEditWnd = (HWND) GetEditHWND();
 
     // Get number of characters in the last (only) line. We'll add this to the character
     // index for the last line, 1st position.
-    int lineLength = (int)SendMessage(hEditWnd, EM_LINELENGTH, (WPARAM) 0, (LPARAM)0L);
+    wxTextPos lineLength = (wxTextPos)SendMessage(hEditWnd, EM_LINELENGTH, (WPARAM) 0, (LPARAM)0L);
 
-    return (long)(lineLength);
+    return lineLength;
 }
 
 void wxComboBox::Replace(long from, long to, const wxString& value)