⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usrfounddlg.cpp

📁 聊天程序
💻 CPP
字号:
// UsrFoundDlg.cpp : implementation file
//

#include "stdafx.h"
#include "MICQWin32x.h"
#include "UsrFoundDlg.h"

#include "MICQComponents.h"

#include "AddUserDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CUsrFoundDlg dialog


CUsrFoundDlg::CUsrFoundDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CUsrFoundDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CUsrFoundDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CUsrFoundDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CUsrFoundDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CUsrFoundDlg, CDialog)
	//{{AFX_MSG_MAP(CUsrFoundDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CUsrFoundDlg message handlers

void CUsrFoundDlg::OnOK() 
{
	// TODO: Add extra validation here
	
	CDialog::OnOK();
	int pos;
	CListBox* userFound = (CListBox*)GetDlgItem(IDC_FOUND_LIST);

	pos=userFound->GetCurSel();
	CAddUserDlg addUsr;
	addUsr.m_new_uin=uins[pos];
	addUsr.DoModal();

	CDialog::OnOK();


}

BOOL CUsrFoundDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	CListBox* userFound = (CListBox*)GetDlgItem(IDC_FOUND_LIST);

//   char tmp[4];
   int pos;
	for (int i=0; i<num_usr_found;i++) {
	   pos=userFound->InsertString(-1,(Contacts[i]));
	//   userFound->SetItemData(pos,uins[i]);

   }
//	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
	return CDialog::OnInitDialog();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -