|
替换后的程序可以收到socket消息,但显示是方框,我发送的是英文
CString temp;
temp.Format(_T("%s"),"Create Server successful!");
m_Msg.AddString(temp);
m_Msg(CListBox)控件
这段程序显示出来也是方框。
另外,wince下的程序发送还是有问题,它只发送一个字符。我把发送的代码贴出来:
void CArmQQDlg::OnSend()
{
// TODO: Add your control notification handler code here
CString msg;
m_SendMsg.GetWindowText(msg);
SendMsg(msg);
CString temp;
temp.Format(_T("%s:%s"),m_Name,msg);
m_Msg.AddString(temp);
}
void CArmQQDlg::SendMsg(CString strMsg)
{
CString str;
str.Format(_T("%s:%s"),m_Name,strMsg);
m_pClient->Send(str.GetBuffer(0),str.GetLength(),0);
}
m_pClient(CCeSocket对象)
|
|