]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/combobox.cpp
fixed event generation for wxChoice: it now sends one and exactly one wxEVT_COMMAND_C...
[wxWidgets.git] / src / os2 / combobox.cpp
index 6f342c5506a4c2f843bfeff1a1059ce15161c51e..c97801ef8573dbcbef6728f6bda1dadb666a4072 100644 (file)
@@ -9,13 +9,11 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#include "wx/combobox.h"
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #ifndef WX_PRECOMP
-    #include "wx/setup.h"
+    #include "wx/defs.h"
     #include "wx/settings.h"
 #endif
 
@@ -158,10 +156,7 @@ bool wxComboBox::Create(
     //
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
 
-    SetFont(*wxSMALL_FONT);
-
-    int                             i;
-    for (i = 0; i < n; i++)
+    for (int i = 0; i < n; i++)
     {
         Append(asChoices[i]);
     }
@@ -279,11 +274,9 @@ wxTextPos wxComboBox::GetLastPosition() const
     return lLineLength;
 } // end of wxComboBox::GetLastPosition
 
-void wxComboBox::Replace(
-  long                              lFrom
-, long                              lTo
-, const wxString&                   rsValue
-)
+void wxComboBox::Replace( long lFrom,
+                          long lTo,
+                          const wxString& rsValue )
 {
 #if wxUSE_CLIPBOARD
     HWND                            hWnd = GetHwnd();
@@ -307,19 +300,23 @@ void wxComboBox::Replace(
     // Paste into edit control
     //
     ::WinSendMsg(hWnd, EM_PASTE, (MPARAM)0, (MPARAM)0L);
+#else
+    wxUnusedVar(lFrom);
+    wxUnusedVar(lTo);
+    wxUnusedVar(rsValue);
 #endif
 } // end of wxComboBox::Replace
 
-void wxComboBox::Remove(
-  long                              lFrom
-, long                              lTo
-)
+void wxComboBox::Remove( long lFrom, long lTo)
 {
 #if wxUSE_CLIPBOARD
     HWND                            hWnd = GetHwnd();
 
     ::WinSendMsg(hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFrom, (USHORT)lTo), 0);
     ::WinSendMsg(hWnd, EM_CUT, (MPARAM)0, (MPARAM)0);
+#else
+    wxUnusedVar(lFrom);
+    wxUnusedVar(lTo);
 #endif
 } // end of wxComboBox::Remove
 
@@ -401,7 +398,6 @@ bool wxComboBox::ProcessEditMsg(
                 return(HandleSetFocus((WXHWND)(HWND)wParam));
             else
                 return(HandleKillFocus((WXHWND)(HWND)wParam));
-            break;
     }
     return false;
 } // end of WinGuiBase_CComboBox::ProcessEditMsg
@@ -442,4 +438,3 @@ MRESULT EXPENTRY wxComboEditWndProc(
 
 #endif
  // wxUSE_COMBOBOX
-