]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/listbox.cpp
fix XPM SaveFile for more than 92 colors
[wxWidgets.git] / src / os2 / listbox.cpp
index b8adb5cec74ef61c9c924499ec88f88b22d3a83a..aaca7eabcb76c03ff319862a77a5cb33a47f1d34 100644 (file)
 
 #if wxUSE_LISTBOX
 
-#include "wx/window.h"
-#include "wx/os2/private.h"
+#include "wx/listbox.h"
 
 #ifndef WX_PRECOMP
-#include "wx/listbox.h"
-#include "wx/settings.h"
-#include "wx/brush.h"
-#include "wx/font.h"
-#include "wx/dc.h"
-#include "wx/dcscreen.h"
-#include "wx/utils.h"
-#include "wx/scrolwin.h"
+    #include "wx/dynarray.h"
+    #include "wx/settings.h"
+    #include "wx/brush.h"
+    #include "wx/font.h"
+    #include "wx/dc.h"
+    #include "wx/dcscreen.h"
+    #include "wx/utils.h"
+    #include "wx/scrolwin.h"
+    #include "wx/log.h"
+    #include "wx/window.h"
 #endif
 
+#include "wx/os2/private.h"
+
 #define INCL_M
 #include <os2.h>
 
-#include "wx/dynarray.h"
-#include "wx/log.h"
-
 #if wxUSE_OWNER_DRAWN
     #include  "wx/ownerdrw.h"
 #endif
@@ -281,7 +281,7 @@ int wxListBox::DoAppend(const wxString& rsItem)
     else
         lIndexType = LIT_END;
 
-    lIndex = (long)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)rsItem.c_str());
+    lIndex = (long)::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)rsItem.wx_str());
     m_nNumItems++;
 
 #if wxUSE_OWNER_DRAWN
@@ -318,7 +318,7 @@ void wxListBox::DoSetItems( const wxArrayString& raChoices,
             lIndexType = LIT_SORTASCENDING;
         else
             lIndexType = LIT_END;
-        ::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)raChoices[i].c_str());
+        ::WinSendMsg(GetHwnd(), LM_INSERTITEM, (MPARAM)lIndexType, (MPARAM)raChoices[i].wx_str());
 
         if (ppClientData)
         {
@@ -563,7 +563,7 @@ void wxListBox::DoInsertItems(const wxArrayString& asItems, unsigned int nPos)
         int nIndex = (int)::WinSendMsg( GetHwnd(),
                                         LM_INSERTITEM,
                                         MPFROMLONG((LONG)(i + nPos)),
-                                        (MPARAM)asItems[i].c_str() );
+                                        (MPARAM)asItems[i].wx_str() );
 
         wxOwnerDrawn* pNewItem = CreateItem(nIndex);
 
@@ -607,13 +607,13 @@ void wxListBox::SetString(unsigned int n, const wxString& rsString)
 
     int nNewN = n;
 
-    if (n == (int)(m_nNumItems - 1))
+    if (n == (m_nNumItems - 1))
         nNewN = -1;
 
     ::WinSendMsg( GetHwnd()
                  ,LM_INSERTITEM
                  ,(MPARAM)nNewN
-                 ,(MPARAM)rsString.c_str()
+                 ,(MPARAM)rsString.wx_str()
                 );
 
     //