ConditionListCtrl.cpp in TestMyCanEditList.ra
Sponsored links
// ConditionListCtrl.cpp : implementation file
//
#include "stdafx.h"
#include "TestMyCanEditList.h"
#include "ConditionListCtrl.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConditionListCtrl
CConditionListCtrl::CConditionListCtrl()
{
}
CConditionListCtrl::~CConditionListCtrl()
{
}
BEGIN_MESSAGE_MAP(CConditionListCtrl, CMyCanEditListCtrl)
//{{AFX_MSG_MAP(CConditionListCtrl)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CConditionListCtrl message handlers
void CConditionListCtrl::InitColumn()
{
for(int i=this->GetHeaderCtrl()->GetItemCount()-1;i>=0;i--)
{
this->DeleteColumn(i);
}
//因为ListCtrl的第一列始终是LVCFMT_LEFT的
//为了使左括号列的标题达到LVCFMT_CENTER的效果,先插入一辅助列,再删除该列
InsertColumn(0,"test",LVCFMT_LEFT,70);
InsertColumn(1,"序号",LVCFMT_RIGHT,70);
InsertColumn(2,"姓名",LVCFMT_LEFT,100);
InsertColumn(3,"性别",LVCFMT_CENTER,80);
InsertColumn(4,"工作单位",LVCFMT_LEFT,100);
InsertColumn(5,"联系电话",LVCFMT_LEFT,100);
InsertColumn(6,"备注",LVCFMT_LEFT,80);
DeleteColumn(0);////
m_arrColType
...
...
... to be continued.
This is a preview. To get the complete source file,
please click here to download the whole source code package.