m_List1.SetItemText(i,1,"在线");
}
}
else
{
int i = m_List2.GetItemCount();
int flag = 0;
for(int j = 1; j <= i; j++)
{
CString tempIP;
m_List2.GetItemText(j-1,0,tempIP.GetBuffer(15),15);
tempIP.ReleaseBuffer();
if(tempIP == inet_ntoa(addr.sin_addr))
{
flag = 1;
break;
}
}
if(flag)
{
m_List2.SetItemText(j-1,1,"在线");
}
else
{
m_List2.InsertItem(i,inet_ntoa(addr.sin_addr));
m_List2.SetItemText(i,1,"在线");
}
}
}
else if(ret == USER_JOIN)
{
int i = m_List2.GetItemCount();
for(int j = 1; j <= i; j++) VC++局域网远程监控系统的设计与实现(10):http://www.youerw.com/jisuanji/lunwen_9599.html