+ if ( m_clientDataItemsType != wxClientData_None )
+ {
+ pData = DoGetItemClientData(n);
+ }
+ else // no client data
+ {
+ pData = NULL;
+ }
+
+ ::WinSendMsg(GetHwnd(), LM_DELETEITEM, (MPARAM)n, 0);
+
+ if (m_windowStyle & wxLB_SORT)
+ nIndexType = LIT_SORTASCENDING;
+ else
+ nIndexType = LIT_END;
+ ::WinSendMsg( GetHwnd()
+ ,LM_INSERTITEM
+ ,(MPARAM)nIndexType
+ ,(MPARAM)rsStr.c_str()
+ );
+
+ if (pData)
+ {
+ DoSetItemClientData( n
+ ,pData
+ );
+ }