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

📄 childfrm.cpp

📁 vc++6.0 开发的电力系统故障滤波数据管理系统
💻 CPP
字号:
// ChildFrm.cpp : implementation of the CChildFrame class
//

#include "stdafx.h"
#include "wgl_32.h"

#include "MainFrm.h"
#include "ChildFrm.h"
#include "RighView.h"
#include "TreeDisp.h"
#include "wgl_32View.h"
#include "StringView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CChildFrame

IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)

BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
	//{{AFX_MSG_MAP(CChildFrame)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CChildFrame construction/destruction

CChildFrame::CChildFrame()
{
}

CChildFrame::~CChildFrame()
{
}

BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
	CRect rect;
	::GetClientRect(((CMDIFrameWnd*)AfxGetMainWnd())->m_hWndMDIClient,&rect);
	cs.x = cs.y = 0;
	cs.cx = rect.right;
	cs.cy = rect.bottom;
	cs.style = WS_CHILD | WS_VISIBLE | WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU
		| FWS_ADDTOTITLE | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_MAXIMIZE;
	return CMDIChildWnd::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CChildFrame diagnostics

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

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

#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CChildFrame message handlers

BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
	int cxl = 160;
	int cyr = 45;
	int cx = lpcs->cx;
	int cy = lpcs->cy;
	if (!m_wndSplitter.CreateStatic(this, 2, 2))
	{
		TRACE0("Failed to CreateStatic Splitter\n");
		return FALSE;
	}
	if (!m_wndSplitter.CreateView(0, 0,
		RUNTIME_CLASS(CTreeDisp), CSize(cxl, cy-cyr), pContext))
	{
		TRACE0("Failed to create first pane\n");
		return FALSE;
	}
	if (!m_wndSplitter.CreateView(0, 1,
		RUNTIME_CLASS(CWgl_32View), CSize(cx-cxl, cy-cyr), pContext))
	{
		TRACE0("Failed to create second pane\n");
		return FALSE;
	}
	if (!m_wndSplitter.CreateView(1, 0,
		RUNTIME_CLASS(CStringView), CSize(cxl, cyr), pContext))
	{
		TRACE0("Failed to create third pane\n");
		return FALSE;
	}
	if (!m_wndSplitter.CreateView(1, 1,
		RUNTIME_CLASS(CRighView), CSize(cx-cxl, cyr), pContext))
	{
		TRACE0("Failed to create forth pane\n");
		return FALSE;
	}

	m_wndSplitter.SetActivePane(0,1);
	return TRUE;
}

⌨️ 快捷键说明

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