- nIndex = (int)::WinSendMsg( GetHwnd()
- ,LM_INSERTITEM
- ,(MPARAM)nIndexType
- ,(MPARAM)rsItem.c_str()
- );
- return nIndex;
-} // end of wxChoice::DoAppend
-
-int wxChoice::DoInsert(
- const wxString& rsItem,
- int pos
-)
-{
- wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list"));
- wxCHECK_MSG((pos>=0) && (pos<=GetCount()), -1, wxT("invalid index"));
-
- if (pos == GetCount())
- return DoAppend(rsItem);
-
- int nIndex;
- LONG nIndexType = 0;
-
- if (m_windowStyle & wxLB_SORT)
- nIndexType = LIT_SORTASCENDING;