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

📄 containerview.cpp

📁 模拟迅雷的下载工具软件
💻 CPP
字号:
// ContainerView.cpp : implementation file
//

#include "stdafx.h"
#include "LeoBlock2004.h"
#include "ContainerView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CContainerView

IMPLEMENT_DYNCREATE(CContainerView, CView)

CContainerView::CContainerView()
{
}

CContainerView::~CContainerView()
{
}


BEGIN_MESSAGE_MAP(CContainerView, CView)
	//{{AFX_MSG_MAP(CContainerView)
	ON_WM_CREATE()
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CContainerView drawing

void CContainerView::OnDraw(CDC* pDC)
{
	CDocument* pDoc = GetDocument();
	// TODO: add draw code here
}

/////////////////////////////////////////////////////////////////////////////
// CContainerView diagnostics

#ifdef _DEBUG
void CContainerView::AssertValid() const
{
	CView::AssertValid();
}

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

/////////////////////////////////////////////////////////////////////////////
// CContainerView message handlers

int CContainerView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CView::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here
	m_plitterWnd.CreateStatic(this,1,2);

	//Context
	CCreateContext *pContext=(CCreateContext*)lpCreateStruct->lpCreateParams;

	if(!m_plitterWnd.CreateView(0, 0, RUNTIME_CLASS(COutbarView), CSize(80, 0), pContext))
		return -1;

	//Create CTestDownView
	if(!m_plitterWnd.CreateView(0,1,RUNTIME_CLASS(CListViewInfo),CSize(0,0),pContext))
		return -1;

	

	return 0;
}

void CContainerView::OnSize(UINT nType, int cx, int cy) 
{
	CView::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
	m_plitterWnd.MoveWindow(-2,-2,cx+4,cy+4);

	
}

COutbarView*  CContainerView::GetOutbarView()
{
	return (COutbarView*)m_plitterWnd.GetPane(0,0);
}

CListViewInfo* CContainerView::GetListViewInfo()
{
	return (CListViewInfo*)m_plitterWnd.GetPane(0,1);
}

void CContainerView::OnInitialUpdate() 
{
	CView::OnInitialUpdate();
	
	// TODO: Add your specialized code here and/or call the base class
	GetOutbarView()->SetCListViewInfo(GetListViewInfo());
}

⌨️ 快捷键说明

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