client/Client/DlgFriends.cpp

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

// Friends.cpp : 实现文件
//

#include "stdafx.h"
#include "Client.h"
#include "DlgFriends.h"
#include "afxdialogex.h"
#include <string>

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// CFriends 对话框

IMPLEMENT_DYNAMIC(CDlgFriends, CDialogEx)

CDlgFriends::CDlgFriends(List_USERDATA& listUserData, CWnd* pParent/*=NULL*/)
	: CDialogEx(CDlgFriends::IDD, pParent)
	, m_listUserData(listUserData)
	, m_ptrCWndParent(pParent)
{

}

CDlgFriends::~CDlgFriends()
{

}

void CDlgFriends::updateFriendsList()
{
	auto itBegin = m_listUserData.begin();
	int nIndex = -1;
	while (itBegin != m_listUserData.end())
	{
#ifdef UNICODE
		CA2W temp(itBegin->get()->nick_name().c_str());
		CString  userId(temp);
#else
		//MultiByteToWideChar
		CString  userId(itBegin->get()->nick_name().c_str()); 
#endif
		nIndex = m_listboxFriends.AddString(userId);
		if (nIndex >= 0)
			m_listboxFriends.SetItemDataPtr(nIndex, itBegin->get());
		++itBegin;
	}
}

void CDlgFriends::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_ListFriends, m_listboxFriends);
}


BEGIN_MESSAGE_MAP(CDlgFriends, CDialogEx)
	ON_LBN_DBLCLK(IDC_ListFriends, &CDlgFriends::OnLbnDblclkListfriends)
后面还有 24 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。