parentview.cpp

来自「网吧管理系统VC源码」· C++ 代码 · 共 86 行

CPP
86
字号
// ParentView.cpp : implementation file
//

#include "stdafx.h"
#include "Server.h"
#include "ParentView.h"
#include "ServerView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CParentView

IMPLEMENT_DYNCREATE(CParentView, CView)

CParentView::CParentView()
{
}

CParentView::~CParentView()
{
}


BEGIN_MESSAGE_MAP(CParentView, CView)
	//{{AFX_MSG_MAP(CParentView)
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CParentView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CParentView diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CParentView message handlers

void CParentView::OnInitialUpdate() 
{
	CRect rect;
	GetClientRect(&rect);
	rect.left += 150;

	CServerView * pView =new CServerView;
	pView->Create(NULL, NULL, WS_CHILD | WS_VISIBLE,
				rect, this, AFX_IDW_PANE_FIRST + 1);
	GetDocument()->AddView(pView);
	//pView->SetActiveWindow();
	//((CFrameWnd*)AfxGetMainWnd())->RecalcLayout();
	//pView->ShowWindow(SW_SHOW);
	CView::OnInitialUpdate();
	
}

void CParentView::OnSize(UINT nType, int cx, int cy) 
{
	CView::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
	
}

⌨️ 快捷键说明

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