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

📄 cdexporerview.cpp

📁 c++编程代码,你看到后会与我联系啊,我非常高兴能在这学习
💻 CPP
字号:
// CDExporerView.cpp : CCDExporerView 类的实现
//

#include "stdafx.h"
#include "CDExporer.h"

#include "CDExporerSet.h"
#include "CDExporerDoc.h"
#include "CDExporerView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CCDExporerView

IMPLEMENT_DYNCREATE(CCDExporerView, CRecordView)

BEGIN_MESSAGE_MAP(CCDExporerView, CRecordView)
	// 标准打印命令
	ON_COMMAND(ID_FILE_PRINT, CRecordView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CRecordView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CRecordView::OnFilePrintPreview)
END_MESSAGE_MAP()

// CCDExporerView 构造/销毁

CCDExporerView::CCDExporerView()
	: CRecordView(CCDExporerView::IDD)
{
	m_pSet = NULL;
	// TODO: 在此处添加构造代码

}

CCDExporerView::~CCDExporerView()
{
}

void CCDExporerView::DoDataExchange(CDataExchange* pDX)
{
	CRecordView::DoDataExchange(pDX);
	// 可以在此处插入 DDX_Field* 函数以将控件“连接”到数据库字段,例如
	// DDX_FieldText(pDX, IDC_MYEDITBOX, m_pSet->m_szColumn1, m_pSet)
	// DDX_FieldCheck(pDX, IDC_MYCHECKBOX, m_pSet->m_bColumn2, m_pSet);
	// 有关更多信息,请参阅 MSDN 和 ODBC 示例
	DDX_FieldText(pDX, IDC_NUMBER, m_pSet->column1, m_pSet);
	DDX_FieldText(pDX, IDC_NAME, m_pSet->column2, m_pSet);
	DDX_FieldText(pDX, IDC_CLASS, m_pSet->column3, m_pSet);
	DDX_FieldText(pDX, IDC_COUNTRY, m_pSet->column4, m_pSet);



}

BOOL CCDExporerView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: 在此处通过修改 CREATESTRUCT cs 来修改窗口类或
	// 样式

	return CRecordView::PreCreateWindow(cs);
}

void CCDExporerView::OnInitialUpdate()
{
	m_pSet = &GetDocument()->m_CDExporerSet;

	CRecordView::OnInitialUpdate();
}


// CCDExporerView 打印

BOOL CCDExporerView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// 默认准备
	return DoPreparePrinting(pInfo);
}

void CCDExporerView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: 打印前添加额外的初始化
}

void CCDExporerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: 打印后添加清除过程
}


// CCDExporerView 诊断

#ifdef _DEBUG
void CCDExporerView::AssertValid() const
{
	CRecordView::AssertValid();
}

void CCDExporerView::Dump(CDumpContext& dc) const
{
	CRecordView::Dump(dc);
}

CCDExporerDoc* CCDExporerView::GetDocument() const // 非调试版本是内联的
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCDExporerDoc)));
	return (CCDExporerDoc*)m_pDocument;
}
#endif //_DEBUG


// CCDExporerView 数据库支持
CRecordset* CCDExporerView::OnGetRecordset()
{
	return m_pSet;
}



// CCDExporerView 消息处理程序

⌨️ 快捷键说明

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