www.gusucode.com > VC++动画翻页效果的电话簿程序源码程序 > VC++动画翻页效果的电话簿程序源码程序/code/FindDlg.cpp

    // FindDlg.cpp : implementation file
// Download by http://www.NewXing.com

#include "stdafx.h"
#include "phonebook.h"
#include "FindDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// FindDlg dialog


FindDlg::FindDlg(CWnd* pParent /*=NULL*/)
	: CDialog(FindDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(FindDlg)
	m_name = _T("");
	//}}AFX_DATA_INIT
}


void FindDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(FindDlg)
	DDX_Control(pDX, IDC_COMBO, m_comb);
	DDX_Text(pDX, IDC_EDIT1, m_name);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(FindDlg, CDialog)
	//{{AFX_MSG_MAP(FindDlg)
	ON_WM_DESTROY()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// FindDlg message handlers

CString FindDlg::GetValue()
{
	return m_name;
}

BOOL FindDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_comb.AddString("1.姓名");
	m_comb.AddString("2.联系电话");
	m_comb.AddString("3.手机号");
	m_comb.AddString("4.E-mail");
	m_comb.AddString("5.邮政编码");
	m_comb.AddString("6.地址");
	m_comb.SetCurSel(0);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

int FindDlg::GetSelect()
{
	return sel;
}

void FindDlg::OnDestroy() 
{
	CDialog::OnDestroy();
	sel=m_comb.GetCurSel();
}