splitter.cpp
来自「this code is used for cypress uzusb seri」· C++ 代码 · 共 73 行
CPP
73 行
////////////////////////////////////////////////////////////////////////////////
// splitter.cpp : implementation file
// $Header: /USB/Util/EzMr/Splitter.cpp 3 8/08/00 2:26p Tpm $
// Copyright (c) 2000 Cypress Semiconductor. May not be reproduced without permission.
// See the EzUsb Developer's Kit license agreement for more details.
////////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ezmr.h"
#include "splitter.h"
#include "RTreDoc.h"
#include "RTreView.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSplitterFrame
IMPLEMENT_DYNCREATE(CSplitterFrame, CMDIChildWnd)
CSplitterFrame::CSplitterFrame()
{
}
CSplitterFrame::~CSplitterFrame()
{
}
BOOL CSplitterFrame::OnCreateClient(LPCREATESTRUCT,
CCreateContext* pContext)
{
// create a splitter with 1 row, 2 columns
if (!m_wndSplitter.CreateStatic(this, 1, 2))
{
TRACE0("Failed to CreateStaticSplitter\n");
return FALSE;
}
// add the first splitter pane - the default view in column 0
if (!m_wndSplitter.CreateView(0, 0,
RUNTIME_CLASS(CRTreView), CSize(200, 50), pContext))
{
TRACE0("Failed to create first pane\n");
return FALSE;
}
// add the second splitter pane - an input view in column 1
if (!m_wndSplitter.CreateView(0, 1,
//RUNTIME_CLASS(CRTreView), CSize(180, 50), pContext))
RUNTIME_CLASS(CRichEditView), CSize(180, 50), pContext))
{
TRACE0("Failed to create second pane\n");
return FALSE;
}
SetActiveView((CView*)m_wndSplitter.GetPane(0,0)); // activate the tree view
(CView*)m_wndSplitter.GetPane(0,1)->EnableWindow(FALSE); //disable input
return TRUE;
}
BEGIN_MESSAGE_MAP(CSplitterFrame, CMDIChildWnd)
//{{AFX_MSG_MAP(CSplitterFrame)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?