資源簡介
c++源代碼 一款類似QQ聊天的IM聊天軟件 功能強大 值得學習 使用了多項技術 其中還涉及數據庫

代碼片段和文件信息
//?AddFriend.cpp?:?implementation?file
//?Download?by?http://www.codefans.net
#include?“stdafx.h“
#include?“imclient.h“
#include?“AddFriend.h“
#include?“P2PClient.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
extern?CP2PClient?g_P2PClient;
/////////////////////////////////////////////////////////////////////////////
//?CAddFriend?dialog
//extern?CP2PClient?g_P2PClient;
CAddFriend::CAddFriend(CWnd*?pParent?/*=NULL*/)
:?CDialog(CAddFriend::IDD?pParent)
{
m_bRecv=FALSE;
//{{AFX_DATA_INIT(CAddFriend)
m_StaticText?=?_T(““);
m_Input?=?_T(““);
m_bAllow?=?FALSE;
//}}AFX_DATA_INIT
}
void?CAddFriend::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAddFriend)
DDX_Control(pDX?IDOK?m_BtnOk);
DDX_Control(pDX?IDCANCEL?m_BtnCancel);
DDX_Control(pDX?IDC_CHECK1?m_Checkctrl);
DDX_Text(pDX?IDC_STATIC_TEXT?m_StaticText);
DDX_Text(pDX?IDC_EDIT1?m_Input);
DDX_Check(pDX?IDC_CHECK1?m_bAllow);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAddFriend?CDialog)
//{{AFX_MSG_MAP(CAddFriend)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CAddFriend?message?handlers
BOOL?CAddFriend::OnInitDialog()?
{
CDialog::OnInitDialog();
//?TODO:?Add?extra?initialization?here
//m_StaticText=m_strText;
//UpdateData(FALSE);
//是對方請求添加
if(m_bRecv)
{
m_Checkctrl.SetWindowText(“添加對方為好友“);
m_BtnOk.SetWindowText(“接受“);
m_BtnCancel.SetWindowText(“拒絕“);
}
SetWindowText(m_StaticText);
return?TRUE;??//?return?TRUE?unless?you?set?the?focus?to?a?control
??????????????//?EXCEPTION:?OCX?Property?Pages?should?return?FALSE
}
void?CAddFriend::OnOK()?
{
//?TODO:?Add?extra?validation?here
UpdateData();
if(m_bRecv)
{
g_P2PClient.AddFriendACK(m_strNom_Inputm_bAllow);
}
CDialog::OnOK();
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
-----------?---------??----------?-----??----
??????????????2486868????????????????????252
- 上一篇:STK/VC仿真程序
- 下一篇:C++課程設計 酒店管理系統 完整版
評論
共有 條評論