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

📄 networkmonitorview.cpp

📁 c++系统开发实例精粹内附的80例源代码 环境:windows2000,c++6.0
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////
// FileFury
// Copyright (c) 2000 Tenebril Incorporated
// All rights reserved.
//
// This source code is governed by the Tenebril open source
// license (http://www.tenebril.com/developers/opensource/license.html)
//
// For more information on this and other open source applications,
// visit the Tenebril OpenSource page:
//       http://www.tenebril.com/developers/opensource
//
//////////////////////////////////////////////////////////////////////

// NetworkMonitorView.cpp : implementation file
//

#include "stdafx.h"
#include "Oscar.h"
#include "NetworkMonitorView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CNetworkMonitorView

IMPLEMENT_DYNCREATE(CNetworkMonitorView, CView)

CNetworkMonitorView::CNetworkMonitorView()
{
}

CNetworkMonitorView::~CNetworkMonitorView()
{
}


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

/////////////////////////////////////////////////////////////////////////////
// CNetworkMonitorView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CNetworkMonitorView diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CNetworkMonitorView message handlers

int CNetworkMonitorView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CView::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// create CListCtrl
	VERIFY (m_cListCtrl.Create (WS_CHILD | WS_VISIBLE | LVS_REPORT, 
		CRect (0, 0, 0, 0), this, IDI_LIST));

	// Setup columns.
	LV_COLUMN lvcol;
	lvcol.cx = 300;
	lvcol.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
	lvcol.fmt = LVCFMT_LEFT;
	lvcol.pszText = (LPSTR)_T("Log entries");     // First column.
	lvcol.iSubItem = 0;
	m_cListCtrl.InsertColumn( 0, &lvcol );

	return 0;
}

void CNetworkMonitorView::OnSize(UINT nType, int cx, int cy) 
{
	CView::OnSize(nType, cx, cy);
	// resize list to fill the whole view
	m_cListCtrl.MoveWindow (0, 0, cx, cy);
}

⌨️ 快捷键说明

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