jhhbsplitter.cpp

来自「串口调试助手的源代码」· C++ 代码 · 共 75 行

CPP
75
字号
// Written by JHCC, 1997

// JHHBSplitter.cpp : implementation file
//

#include "stdafx.h"
#include "JHHBSplitter.h"
#include "JHHB.h"

#include "JHHBDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CJHHBSplitter

CJHHBSplitter::CJHHBSplitter()
{
}

CJHHBSplitter::~CJHHBSplitter()
{
}

#include "RowView.h"
#include "LogView.h"
#include "DataListView.h"
BOOL	CJHHBSplitter::Create(CFrameWnd*  pFrameWnd, CCreateContext*  pContext)
{
	const int	nSizeOfDataList = 240;
	const int nSizeOfCurve = 160;
	const int	nSizeOfLog = 80;

	// create a splitter with 2 row, 1 columns
	if (!CreateStatic(pFrameWnd, 3, 1))
	{
		TRACE0("Failed to CreateStaticSplitter\n");
		return  FALSE;
	}

	if (!CreateView(0, 0,
		RUNTIME_CLASS(CDataListView), CSize(0, nSizeOfDataList), pContext))
	{
		TRACE0("Failed to create third pane\n");
		return  FALSE;
	}

	// add the first splitter pane - the default view in row 0
	if (!CreateView(1, 0,
		pContext->m_pNewViewClass, CSize(0, nSizeOfCurve), pContext))
	{
		TRACE0("Failed to create first pane\n");
		return  FALSE;
	}

	// add the second splitter pane - an Log view in row 1
	if (!CreateView(2, 0,
		RUNTIME_CLASS(CLogView), CSize(0, nSizeOfLog), pContext))
	{
		TRACE0("Failed to create second pane\n");
		return  FALSE;
	}
	return  TRUE;
}

BEGIN_MESSAGE_MAP(CJHHBSplitter, CSplitterWnd)
	//{{AFX_MSG_MAP(CJHHBSplitter)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

⌨️ 快捷键说明

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