mainfrm.cpp

来自「本书所附光盘的内容包含了开发实例的所有程序源码」· C++ 代码 · 共 40 行

CPP
40
字号
// MainFrm.cpp : CMainFrame 类的实现
//
#include "stdafx.h"
#include "Example.h"
#include "MainFrm.h"
#include "ExampleDoc.h"
#include "ExampleView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

// CMainFrame
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
END_MESSAGE_MAP()

// CMainFrame 构造/销毁
CMainFrame::CMainFrame()
{
	// TODO:在此添加成员初始化代码
}

CMainFrame::~CMainFrame()
{
}

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
	// TODO: 在此添加专用代码和/或调用基类
	CRect cr;
	GetClientRect(&cr);
	CSize paneSize(cr.Width()/3, cr.Height() /3);
	m_Splitter.CreateStatic(this,3,1);
	m_Splitter.CreateView(0,0,RUNTIME_CLASS(CExampleView),paneSize,pContext);
	m_Splitter.CreateView(1,0,RUNTIME_CLASS(CExampleView),paneSize,pContext);
	m_Splitter.CreateView(2,0,RUNTIME_CLASS(CExampleView),paneSize,pContext);
	return TRUE;
	//return CFrameWnd::OnCreateClient(lpcs, pContext);
}

⌨️ 快捷键说明

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