msgview.cpp

来自「无线传感器网络mrps协议算法的vc实现算法」· C++ 代码 · 共 87 行

CPP
87
字号
// MsgView.cpp : implementation file
//

#include "stdafx.h"
#include "Wsn.h"
#include "MsgView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMsgView

IMPLEMENT_DYNCREATE(CMsgView, CListView)

CMsgView::CMsgView()
{
}

CMsgView::~CMsgView()
{
}


BEGIN_MESSAGE_MAP(CMsgView, CListView)
	//{{AFX_MSG_MAP(CMsgView)
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMsgView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CMsgView diagnostics

#ifdef _DEBUG
void CMsgView::AssertValid() const
{
	CListView::AssertValid();
}

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

/////////////////////////////////////////////////////////////////////////////
// CMsgView message handlers

BOOL CMsgView::PreCreateWindow(CREATESTRUCT& cs) 
{
	// TODO: Add your specialized code here and/or call the base class
	cs.style |= LVS_REPORT;
	return CListView::PreCreateWindow(cs);
	
}

int CMsgView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CListView::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here
	CListCtrl &ListCtrl = GetListCtrl();
	LVCOLUMN col;
	col.mask = LVCF_FMT | LVCF_TEXT;
	col.pszText = _T("数据传送");
	col.fmt = LVCFMT_LEFT;
	ListCtrl.InsertColumn(1, &col);
	
   	ListCtrl.SetColumnWidth(0, 300);

	
	return 0;
}

⌨️ 快捷键说明

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