showobjectfrm.cpp

来自「深入浅出Visual C++入门进阶与应用实例 随书光盘 作者 何志丹」· C++ 代码 · 共 55 行

CPP
55
字号
// ShowObjectFrm.cpp : implementation file
//

#include "stdafx.h"
#include "Ex090202.h"
#include "ShowObjectFrm.h"
#include "ShowObjectView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CShowObjectFrm

IMPLEMENT_DYNCREATE(CShowObjectFrm, CFrameWnd)

CShowObjectFrm::CShowObjectFrm(CWnd * pParent ,CRect r )
{
	Create(NULL, "", WS_OVERLAPPEDWINDOW, r,pParent);
    ShowWindow(SW_SHOW);	
    UpdateWindow();	
}

CShowObjectFrm::~CShowObjectFrm()
{
}


BEGIN_MESSAGE_MAP(CShowObjectFrm, CFrameWnd)
	//{{AFX_MSG_MAP(CShowObjectFrm)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CShowObjectFrm message handlers

BOOL CShowObjectFrm::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
	CCreateContext createContext;
	createContext.m_pNewViewClass = RUNTIME_CLASS(CShowObjectView) ;
	createContext.m_pCurrentDoc = NULL ;
	createContext.m_pNewDocTemplate = NULL ;
	createContext.m_pLastView = NULL ;
	createContext.m_pCurrentFrame = NULL ;
	CWnd * pView = CreateView(&createContext);

	SetActiveView((CView*)pView);
	
	return TRUE ;
}

⌨️ 快捷键说明

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