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

📄 myodbc_showview.cpp

📁 机械工业出版社《SQL Server应用开发实例教程》源代码
💻 CPP
字号:
// myodbc_showView.cpp : implementation of the CMyodbc_showView class
//

#include "stdafx.h"
#include "myodbc_show.h"

#include "myodbc_showSet.h"
#include "myodbc_showDoc.h"
#include "myodbc_showView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyodbc_showView

IMPLEMENT_DYNCREATE(CMyodbc_showView, CRecordView)

BEGIN_MESSAGE_MAP(CMyodbc_showView, CRecordView)
	//{{AFX_MSG_MAP(CMyodbc_showView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyodbc_showView construction/destruction

CMyodbc_showView::CMyodbc_showView()
	: CRecordView(CMyodbc_showView::IDD)
{
	//{{AFX_DATA_INIT(CMyodbc_showView)
	m_pSet = NULL;
	//}}AFX_DATA_INIT
	// TODO: add construction code here

}

CMyodbc_showView::~CMyodbc_showView()
{
}

void CMyodbc_showView::DoDataExchange(CDataExchange* pDX)
{
	CRecordView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyodbc_showView)
	DDX_FieldText(pDX, IDC_EMPLOYEENAME, m_pSet->m_fname, m_pSet);
	DDX_FieldText(pDX, IDC_IMPLOYEEID, m_pSet->m_emp_id, m_pSet);
	DDX_FieldText(pDX, IDC_JOBLVL, m_pSet->m_job_lvl, m_pSet);
	//}}AFX_DATA_MAP
}

BOOL CMyodbc_showView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CRecordView::PreCreateWindow(cs);
}

void CMyodbc_showView::OnInitialUpdate()
{
	m_pSet = &GetDocument()->m_myodbc_showSet;
	CRecordView::OnInitialUpdate();
	GetParentFrame()->RecalcLayout();
	ResizeParentToFit();

}

/////////////////////////////////////////////////////////////////////////////
// CMyodbc_showView diagnostics

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

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

CMyodbc_showDoc* CMyodbc_showView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMyodbc_showDoc)));
	return (CMyodbc_showDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMyodbc_showView database support
CRecordset* CMyodbc_showView::OnGetRecordset()
{
	return m_pSet;
}


/////////////////////////////////////////////////////////////////////////////
// CMyodbc_showView message handlers

⌨️ 快捷键说明

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