📄 exam1_1_8view.cpp
字号:
// Exam1_1_8View.cpp : implementation of the CExam1_1_8View class
//
#include "stdafx.h"
#include "Exam1_1_8.h"
#include "Exam1_1_8Doc.h"
#include "Exam1_1_8View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CExam1_1_8View
IMPLEMENT_DYNCREATE(CExam1_1_8View, CFormView)
BEGIN_MESSAGE_MAP(CExam1_1_8View, CFormView)
//{{AFX_MSG_MAP(CExam1_1_8View)
// 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
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CExam1_1_8View construction/destruction
CExam1_1_8View::CExam1_1_8View()
: CFormView(CExam1_1_8View::IDD)
{
//{{AFX_DATA_INIT(CExam1_1_8View)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CExam1_1_8View::~CExam1_1_8View()
{
}
void CExam1_1_8View::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CExam1_1_8View)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BOOL CExam1_1_8View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CFormView::PreCreateWindow(cs);
}
void CExam1_1_8View::OnInitialUpdate()
{
CWnd* pwndPropSheetHolder = GetDlgItem(IDC_PLACEHOLDER);
// 创建属性单
m_pMyPropSheet = new CMyPropSheet(pwndPropSheetHolder);
if (!m_pMyPropSheet->Create(pwndPropSheetHolder, WS_CHILD | WS_VISIBLE, 0))
{
delete m_pMyPropSheet;
m_pMyPropSheet = NULL;
return;
}
// 在图片控件中显示属性页
CRect rectPropSheet;
pwndPropSheetHolder->GetWindowRect(rectPropSheet);
m_pMyPropSheet->SetWindowPos(NULL, 0, 0,
rectPropSheet.Width(), rectPropSheet.Height(),
SWP_NOZORDER | SWP_NOACTIVATE);
// 调用基类OnInitialUpdate()
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
}
/////////////////////////////////////////////////////////////////////////////
// CExam1_1_8View printing
BOOL CExam1_1_8View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CExam1_1_8View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CExam1_1_8View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
void CExam1_1_8View::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
// TODO: add customized printing code here
}
/////////////////////////////////////////////////////////////////////////////
// CExam1_1_8View diagnostics
#ifdef _DEBUG
void CExam1_1_8View::AssertValid() const
{
CFormView::AssertValid();
}
void CExam1_1_8View::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
CExam1_1_8Doc* CExam1_1_8View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CExam1_1_8Doc)));
return (CExam1_1_8Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CExam1_1_8View message handlers
void CExam1_1_8View::CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType)
{
// TODO: Add your specialized code here and/or call the base class
CFormView::CalcWindowRect(lpClientRect, nAdjustType);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -