freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

vc++設(shè)計簡單的聊天室(文件)

2024-12-28 01:10 上一頁面

下一頁面
 

【正文】 rol } void CServerDlg::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID amp。 大連望月設(shè)計室 18 } } void CServerDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this)。 CRect rect。 int y = (() cyIcon + 1) / 2。 } void CServerDlg::OnBnStart() { // 創(chuàng)建套接字 (m_iNetPort)。 ShowInDisplay(strInfo)。 } void CServerDlg::OnBnClose() { CloseServer()。 pNewClientInitialize(this)。 // 關(guān)閉該用戶 p_delClientShutDown()。 大連望月設(shè)計室 20 // 在用戶鏈表中刪除該用戶 POSITION psCur, psList = ()。 if(p_delClient==p_curClient) { (psCur)。 NETMESSAGE Message(PTC_CLIENT_QUIT, p_delClientGetName(), _T(), p_delClientGetName() + strMsg)。 // 刪除該用戶 delete p_delClient。Message, sizeof(Message))。 case PTC_SAY: // 普通聊天 ShowMessage(Message)。 // 向所有客戶發(fā)送服務(wù)端關(guān)閉的信息 CString strInfo。 // 服務(wù)端界面顯示關(guān)閉信息 ShowInDisplay(strInfo)。 POSITION psList = ()。 m_pClientClose()。 } // 向所有戶發(fā)出信息 void CServerDlg::SendToAllClient(const NETMESSAGE amp。 m_pClientSendMsg(Message)。 // TODO: Add your message handler code here } // 新用戶加入 void CServerDlg::NewClientAdd(CMySocket *p_client, NETMESSAGE *Message) 大連望月設(shè)計室 23 { // 存入用戶名字 p_clientSetName(Messageform)。 CString strMsg。 strcpy(, (LPCTSTR)strMsg)。 strcpy(Messagedata, (LPCTSTR)strMsg)。 } CString strForm = 。 } 客戶端: // : implementation file include include include ifdef _DEBUG define new DEBUG_NEW undef THIS_FILE static char THIS_FILE[ ] = __FILE__。 // DDX/DDV support protected: DECLARE_MESSAGE_MAP() }。 m_bWhispering = FALSE。 DDX_Text(pDX, IDC_EDIT_DIAPLAY, m_strDisplay)。 ASSERT((IDM_ABOUTBOX amp。 if (pSysMenu != NULL) { CString strAboutMenu。 } } SetIcon(m_hIcon, TRUE)。 m_iNetPort = 3127。 return TRUE。 } else { CDialog::OnSysCommand(nID, lParam)。 int cyIcon = GetSystemMetrics(SM_CYICON)。 int x = (() cxIcon + 1) / 2。 } } HCURSOR CClientDlg::OnQueryDragIcon() { return (HCURSOR) m_hIcon。 if(iResult==IDCANCEL){return。 return。 // 連接服務(wù)器 if(!(m_strNetIP, m_iNetPort)) { int n = ()。 } (IDS_SUCCEED_CONNECT)。 (Message)。 } void CClientDlg::OnBnClose() { if(m_bConnect) { ()。 GetDlgItem(IDC_BN_SEND)EnableWindow(FALSE)。 ShowInDisplay(strMsg)。 } void CClientDlg::OnReceive() { NETMESSAGE Message。 // 過濾自已發(fā)出的信息 if(strForm==m_strName) return。 break。 case PTC_SAY: ShowMessage(Message)。 case PTC_CLIENT_QUIT: // 有用戶退出 ((1, strForm))。 CString strMsg。 m_bConnect = FALSE。 ()。 strcpy(, m_strSend)。 return。 } // 發(fā)送該信息 (Message)。 } void CClientDlg::ShowInDisplay(CString str) { m_strDisplay += str + \r\n。 if(strTo==_T()) { strTo = 所有人 。 CString strOut = strForm + 對 + strTo + 說 : + strMsg。 } 。 } void CClientDlg::OnDblclkListUser() { // TODO: Add your control notification handler code here (1)。 } CString strForm = 。 } void CClientDlg::ShowMessage(const NETMESSAGE amp。 CString strMsg = 。 } else { strcpy(, _T(所有人 ))。 } if(m_bWhispering) { // 密語 CString strTo = 。 // 主要是填充 NETMESSAGE 結(jié)構(gòu)體 NETMESSAGE Message。 GetDlgItem(IDC_BN_CLOSE)EnableWindow(FALSE)。 ShowInDisplay(strMsg)。 break。 ShowMessage(Message)。 ShowInDisplay(strMsg)。 CString strMsg = 。Message, sizeof(Message))。 m_strSend = _T()。 CString strMsg。 GetDlgItem(IDC_BN_CONNECT)EnableWindow(TRUE)。 GetDlgItem(IDC_BN_CLOSE)EnableWindow(TRUE)。 m_bConnect = TRUE。 ShowInDisplay(strConnectError)。 (IDS_CONNECTING)。 // 創(chuàng)建套接字 if(!()) { (IDS_FAIL_CREATE_SOCKET)。 // 獲取用戶名字 CInputDlg inputDlg。 (x, y, m_
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1