+ wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list"));
+ wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index"));
+
+ if (pos == GetCount())
+ return DoAppend(rsItem);
+
+ int nIndex;
+ LONG nIndexType = 0;
+
+ if (m_windowStyle & wxCB_SORT)
+ nIndexType = LIT_SORTASCENDING;
+ else
+ nIndexType = pos;
+ nIndex = (int)::WinSendMsg( GetHwnd()
+ ,LM_INSERTITEM
+ ,(MPARAM)nIndexType
+ ,(MPARAM)rsItem.wx_str()
+ );
+ return nIndex;
+} // end of wxChoice::DoInsert
+
+void wxChoice::Delete(unsigned int n)
+{
+ wxCHECK_RET( IsValid(n), wxT("invalid item index in wxChoice::Delete") );
+
+ if ( HasClientObjectData() )
+ {
+ delete GetClientObject(n);
+ }
+