不太明白,列表框可以用以下函数输出文本, CListCtrl::SetItemText BOOL SetItemText( int nItem, int nSubItem, LPTSTR lpszText );Return ValueNonzero if successful; otherwise zero.ParametersnItemIndex of the item whose text is to be set.nSubItemIndex of the subitem, or zero to set the item label.lpszTextPointer to a string that contains the new item text. 用int sprintf( char *buffer, const char *format [, argument] ... );可以工具需要写字符
void CRECVDlg::VoiceReceive(char *recbuff) { mysocket.Receive(recbuff,MAXBUFFSIZE); } 中的recbuff如何转成16进制的数显示在列表框里,比如显示02 ef cb这样的数
for(i=0;i< 接收到字符;i++
{
str.Format("0x4x ", 接收到的第i个字符)
listBox.AddString (str);
}
CListCtrl::SetItemText
BOOL SetItemText( int nItem, int nSubItem, LPTSTR lpszText );Return ValueNonzero if successful; otherwise zero.ParametersnItemIndex of the item whose text is to be set.nSubItemIndex of the subitem, or zero to set the item label.lpszTextPointer to a string that contains the new item text.
用int sprintf( char *buffer, const char *format [, argument] ... );可以工具需要写字符
{
mysocket.Receive(recbuff,MAXBUFFSIZE);
}
中的recbuff如何转成16进制的数显示在列表框里,比如显示02 ef cb这样的数