⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 childfrm.cpp

📁 VC开发环境下
💻 CPP
字号:
// ChildFrm.cpp : implementation of the CChildFrame class
//
#include "stdafx.h"
#include "IndexEditor.h"

#include "ChildFrm.h"
#include ".\childfrm.h"
#include "IndexEditorDoc.h"
#include "IndexEditorView.h"
#include "IndexList.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CChildFrame

IMPLEMENT_DYNCREATE(CChildFrame, CBCGPMDIChildWnd)

BEGIN_MESSAGE_MAP(CChildFrame, CBCGPMDIChildWnd)
END_MESSAGE_MAP()


// CChildFrame construction/destruction

CChildFrame::CChildFrame()
{
	// TODO: add member initialization code here
}

CChildFrame::~CChildFrame()
{
}

BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
{
	if(!m_wndSplitter.CreateStatic(this,1,2))
		return FALSE;
	
	if(!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CIndexList),CSize(200,0),pContext))
		return FALSE;

	if(!m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CIndexEditorView),CSize(0,0),pContext))
		return FALSE;

	CIndexList *pListView=(CIndexList*)m_wndSplitter.GetPane(0,0);
	CIndexEditorView *pGridView=(CIndexEditorView*)m_wndSplitter.GetPane(0,1);
	pListView->SetGridView(pGridView);

	SetActiveView((CView*)pListView);

	return TRUE;
	//return m_wndSplitter.Create(this,
	//	2, 2,			// TODO: adjust the number of rows, columns
	//	CSize(10, 10),	// TODO: adjust the minimum pane size
	//	pContext);
}

BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying the CREATESTRUCT cs
	if( !CBCGPMDIChildWnd::PreCreateWindow(cs) )
		return FALSE;

	//cs.style |= WS_MAXIMIZE;
	//cs.style = WS_CHILD | WS_VISIBLE | WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU
	//	| FWS_ADDTOTITLE | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_MAXIMIZE;

	return TRUE;
}


// CChildFrame diagnostics

#ifdef _DEBUG
void CChildFrame::AssertValid() const
{
	CBCGPMDIChildWnd::AssertValid();
}

void CChildFrame::Dump(CDumpContext& dc) const
{
	CBCGPMDIChildWnd::Dump(dc);
}

#endif //_DEBUG


// CChildFrame message handlers

void CChildFrame::ActivateFrame(int nCmdShow)
{
	// TODO: Add your specialized code here and/or call the base class
	nCmdShow=SW_MAXIMIZE;
	CBCGPMDIChildWnd::ActivateFrame(nCmdShow);
}

⌨️ 快捷键说明

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