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

📄 resolvedatabind.cpp

📁 mapx地图
💻 CPP
字号:
// ResolveDatabind.cpp : implementation file
//
/* 
 * This sample application and corresponding sample code is provided 
 * for example purposes only.  It has not undergone rigorous testing
 * and as such should not be shipped as part of a final application
 * without extensive testing on the part of the organization releasing
 * the end-user product.
 */

#include "stdafx.h"
#include "mapxsamp.h"
#include "ResolveDatabind.h"

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

/////////////////////////////////////////////////////////////////////////////
// CResolveDatabind dialog


CResolveDatabind::CResolveDatabind(CWnd* pParent /*=NULL*/)
	: CDialog(CResolveDatabind::IDD, pParent)
{
	//{{AFX_DATA_INIT(CResolveDatabind)
	m_strTitle = _T("");
	m_nChoice = 0;
	//}}AFX_DATA_INIT
	m_pStrList = NULL;
}


void CResolveDatabind::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CResolveDatabind)
	DDX_Control(pDX, IDC_LIST, m_list);
	DDX_Text(pDX, IDC_STATICTITLE, m_strTitle);
	DDX_LBIndex(pDX, IDC_LIST, m_nChoice);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CResolveDatabind message handlers

BOOL CResolveDatabind::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	if (!m_pStrList) {
		EndDialog(IDCANCEL);
		return TRUE;
	}

	POSITION pos = m_pStrList->GetHeadPosition();
	while (pos) {
		CString str = m_pStrList->GetNext(pos);
		m_list.AddString(str);
	}
	m_list.SetCurSel(0);

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

⌨️ 快捷键说明

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