]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/choice.cpp
support metal appearance
[wxWidgets.git] / src / os2 / choice.cpp
index c989624c46510cbb7464c0e4537695be12a0dc83..793111d6b57caf85630abab30593f5c73d7635ce 100644 (file)
 
 IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
 
+bool wxChoice::Create(
+  wxWindow*                         pParent
+, wxWindowID                        vId
+, const wxPoint&                    rPos
+, const wxSize&                     rSize
+, const wxArrayString&              asChoices
+, long                              lStyle
+, const wxValidator&                rValidator
+, const wxString&                   rsName
+)
+{
+    wxCArrayString chs(asChoices);
+
+    return Create(pParent, vId, rPos, rSize, chs.GetCount(), chs.GetStrings(),
+                  lStyle, rValidator, rsName);
+}
+
 bool wxChoice::Create(
   wxWindow*                         pParent
 , wxWindowID                        vId
@@ -97,7 +114,7 @@ int wxChoice::DoAppend(
 )
 {
     int                             nIndex;
-    SHORT                           nIndexType = 0;
+    LONG                            nIndexType = 0;
 
     if (m_windowStyle & wxLB_SORT)
         nIndexType = LIT_SORTASCENDING;
@@ -112,7 +129,7 @@ int wxChoice::DoAppend(
 } // end of wxChoice::DoAppend
 
 int wxChoice::DoInsert(
-  const wxString&                   rsItem
+  const wxString&                   rsItem,
   int                               pos
 )
 {
@@ -120,10 +137,10 @@ int wxChoice::DoInsert(
     wxCHECK_MSG((pos>=0) && (pos<=GetCount()), -1, wxT("invalid index"));
 
     if (pos == GetCount())
-        return DoAppend(item);
+        return DoAppend(rsItem);
 
     int                             nIndex;
-    SHORT                           nIndexType = 0;
+    LONG                            nIndexType = 0;
 
     if (m_windowStyle & wxLB_SORT)
         nIndexType = LIT_SORTASCENDING;
@@ -210,7 +227,7 @@ void wxChoice::SetString(
 , const wxString&                   rsStr
 )
 {
-    SHORT                           nIndexType = 0;
+    LONG                            nIndexType = 0;
     void*                           pData;
 
     if ( m_clientDataItemsType != wxClientData_None )
@@ -246,7 +263,7 @@ wxString wxChoice::GetString(
   int                               n
 ) const
 {
-    size_t                          nLen = 0;
+    int                             nLen = 0;
     wxString                        sStr = "";
     char*                           zBuf;