smslistview.cpp

来自「使用短信猫可以实现短信的群发」· C++ 代码 · 共 77 行

CPP
77
字号
// SMSListView.cpp : implementation file
//

#include "stdafx.h"
#include "sms.h"
#include "SMSListView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSMSListView

IMPLEMENT_DYNCREATE(CSMSListView, CListView)

CSMSListView::CSMSListView()
{
}

CSMSListView::~CSMSListView()
{
}


BEGIN_MESSAGE_MAP(CSMSListView, CListView)
	//{{AFX_MSG_MAP(CSMSListView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSMSListView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CSMSListView diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CSMSListView message handlers


void CSMSListView::InitListView()
{
	CListCtrl & listCtrl=GetListCtrl();
	DWORD type=GetWindowLong(listCtrl.GetSafeHwnd(),GWL_STYLE);
	type=type | LVS_REPORT; 
	SetWindowLong(listCtrl.GetSafeHwnd(),GWL_STYLE,type);
	
	listCtrl.SetExtendedStyle(LVS_REPORT);//为表格添加附加属性 让表格有方格线
	
	listCtrl.InsertColumn(0,"时间",LVCFMT_LEFT,90);
	listCtrl.InsertColumn(1,"号码",LVCFMT_LEFT,90);
	listCtrl.InsertColumn(2,"动作",LVCFMT_LEFT,90);
	listCtrl.InsertColumn(3,"状态",LVCFMT_LEFT,90);
	listCtrl.InsertColumn(4,"内容",LVCFMT_LEFT,90);
}

⌨️ 快捷键说明

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