hselecttablebydsn.cpp

来自「深入浅出Visual C++入门进阶与应用实例 随书光盘 作者 何志丹」· C++ 代码 · 共 46 行

CPP
46
字号
// HSelectTableByDSN.cpp: implementation of the HSelectTableByDSN class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "HSelectTableByDSN.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

HSelectTableByDSN::HSelectTableByDSN(CString strDSN)
{
	::GetTables(strDSN,m_arTables);
}

HSelectTableByDSN::~HSelectTableByDSN()
{

}

CString HSelectTableByDSN::GetTables()
{
	if(m_strTitle.IsEmpty())
		m_strTitle = "选择表";

	if(m_strInfo.IsEmpty())
	{
		CString strInfo ="请选择";
		if(m_style & ST_MUIT)
			strInfo += "(多选)";
		if(0 == (m_style & ST_READONLY))
			strInfo += "或输入";
		strInfo += "合适的表名";
		m_strInfo = strInfo;
	}

	return CSelectTables::GetTables();
}

⌨️ 快捷键说明

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