📄 childframe1.cpp
字号:
// ChildFrame.cpp : implementation file
//
#include "stdafx.h"
#include "attendance.h"
#include "ChildFrame.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CChildFrame
IMPLEMENT_DYNCREATE(CChildFrame, CFrameWnd)
CChildFrame::CChildFrame()
{
}
CChildFrame::~CChildFrame()
{
}
BEGIN_MESSAGE_MAP(CChildFrame, CFrameWnd)
//{{AFX_MSG_MAP(CChildFrame)
ON_WM_CREATE()
ON_COMMAND(ID_PRINT_PREVIEW, OnPrintPreview)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChildFrame message handlers
int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
CCreateContext context;
context.m_pNewViewClass = RUNTIME_CLASS(CChildView);
context.m_pCurrentFrame = this;
context.m_pCurrentDoc = NULL;
context.m_pLastView = NULL;
m_pView = STATIC_DOWNCAST(CChildView, CFrameWnd::CreateView(&context)); //CreateView(&context);
if(m_pView != NULL)
{
m_pView->ShowWindow(SW_HIDE);//SHOW
CFrameWnd::SetActiveView(m_pView);
}
return 0;
}
void CChildFrame::OnPrintPreview()
{
// TODO: Add your command handler code here
//CAttendanceApp* app=(CAttendanceApp*)AfxGetApp();app->m_pChildFrame->
m_pView->ShowWindow(SW_SHOW);//HIDE
CFrameWnd::SetActiveView(m_pView);
m_pView->OnFilePrintPreview(this);//(CFrameWnd *)
}
/*
void CChildFrame::OnPrint()
{
// TODO: Add your command handler code here
//CAttendanceApp* app=(CAttendanceApp*)AfxGetApp();app->m_pChildFrame->
m_pView->OnFilePrint();
}
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -