www.pudn.com > 单文档多视图.rar > View7.cpp


// View7.cpp : implementation of the C7View class 
// 
 
#include "stdafx.h" 
 
#include "SdiMulti.h" 
#include "SdiMDoc.h" 
 
#include "View7.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// C7View 
 
IMPLEMENT_DYNCREATE(C7View, CFormView) 
 
BEGIN_MESSAGE_MAP(C7View, CFormView) 
	//{{AFX_MSG_MAP(C7View) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// C7View construction/destruction 
 
C7View::C7View() 
	: CFormView(C7View::IDD) 
{ 
	//{{AFX_DATA_INIT(C7View) 
	m_strEdit1 = _T(""); 
	//}}AFX_DATA_INIT 
	// TODO: add construction code here 
 
} 
 
C7View::~C7View() 
{ 
} 
 
void C7View::DoDataExchange(CDataExchange* pDX) 
{ 
	CFormView::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(C7View) 
	DDX_Text(pDX, IDC_EDIT1, m_strEdit1); 
	//}}AFX_DATA_MAP 
} 
 
BOOL C7View::PreCreateWindow(CREATESTRUCT& cs) 
{ 
	// TODO: Modify the Window class or styles here by modifying 
	//  the CREATESTRUCT cs 
 
	return CFormView::PreCreateWindow(cs); 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// C7View diagnostics 
 
#ifdef _DEBUG 
void C7View::AssertValid() const 
{ 
	CFormView::AssertValid(); 
} 
 
void C7View::Dump(CDumpContext& dc) const 
{ 
	CFormView::Dump(dc); 
} 
 
CSdiMultiDoc* C7View::GetDocument() // non-debug version is inline 
{ 
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSdiMultiDoc))); 
	return (CSdiMultiDoc*)m_pDocument; 
} 
#endif //_DEBUG 
 
///////////////////////////////////////////////////////////////////////////// 
// C7View message handlers 
 
BOOL C7View::OnInitDialog()  
{ 
	return TRUE; 
} 
 
void C7View::OnInitialUpdate()  
{ 
	CFormView::OnInitialUpdate(); 
	m_strEdit1 = "CFormView"; 
	UpdateData(FALSE); 
}