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

📄 rightview.cpp

📁 一个类似VB代码编辑器.通过一个多文档模板导出
💻 CPP
字号:
// RightView.cpp : implementation file
//

#include "stdafx.h"
#include "RightView.h"

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

/////////////////////////////////////////////////////////////////////////////
// RightView

IMPLEMENT_DYNCREATE(RightView, CFormView)

RightView::RightView()
	: CFormView(RightView::IDD)
{
	//{{AFX_DATA_INIT(RightView)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	treeview =NULL;
}

RightView::~RightView()
{
}

void RightView::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(RightView)
	DDX_Control(pDX, IDC_SYMBOL, m_symbol);
	//}}AFX_DATA_MAP
	
}


BEGIN_MESSAGE_MAP(RightView, CFormView)
	//{{AFX_MSG_MAP(RightView)
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// RightView diagnostics

#ifdef _DEBUG
void RightView::AssertValid() const
{
	CFormView::AssertValid();
}

void RightView::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// RightView message handlers

void RightView::OnSize(UINT nType, int cx, int cy) 
{
	CFormView::OnSize(nType, cx, cy);
    ShowScrollBar(SB_BOTH,FALSE);
	AdjustSize();
}

void RightView::AdjustSize()
{
	CRect rect,SymbolRect,TreeViewRect;
	GetClientRect(rect);
	SymbolRect.left     =rect.left-2;
	SymbolRect.right    =rect.right-1;
	SymbolRect.top      =rect.top;
	SymbolRect.bottom   =rect.top +19;
	TreeViewRect.top    =rect.top +17;
	TreeViewRect.bottom =rect.bottom;
	TreeViewRect.right  =rect.right;
	TreeViewRect.left   =rect.left-2;
    m_symbol.MoveWindow(SymbolRect);
	if(treeview->GetSafeHwnd())
		treeview->MoveWindow(TreeViewRect);
}

void RightView::OnInitialUpdate() 
{
	CFormView::OnInitialUpdate();
	
	CCreateContext   ctx1;   
	ctx1.m_pCurrentDoc     =   NULL;    
	ctx1.m_pCurrentFrame   =   NULL;   
	ctx1.m_pLastView       =   NULL;   
	ctx1.m_pNewDocTemplate =   NULL;   
	ctx1.m_pNewViewClass   =   RUNTIME_CLASS(TreeView);   
	treeview   =   (TreeView*)((CFrameWnd *)this)->CreateView(&ctx1);  
	AdjustSize();
}

⌨️ 快捷键说明

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