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

📄 commonlist.cpp

📁 3D reconstruction, medical image processing from colons, using intel image processing for based clas
💻 CPP
字号:
// CommonList.cpp : implementation file//#include "stdafx.h"#include "CommonList.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// RxCommonListRxCommonList::RxCommonList(BOOL bTag) : m_bTag(bTag){	m_pbSortAscending = NULL;	m_pnSortType = NULL;	m_nNoOfColumn = 0;}RxCommonList::~RxCommonList(){	if (m_pbSortAscending) {		delete[] m_pbSortAscending;		m_pbSortAscending = NULL;	}	if (m_pnSortType) {		delete[] m_pnSortType;		m_pnSortType = NULL;	}}BEGIN_MESSAGE_MAP(RxCommonList, CListCtrl)	//{{AFX_MSG_MAP(RxCommonList)	ON_WM_DESTROY()	//}}AFX_MSG_MAPEND_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// RxCommonList message handlersvoid RxCommonList::ClearAllData(){	int i, nCount = GetItemCount();	CString * pStr;	for(i = 0; i < nCount; i++)	{		pStr=(CString *)GetItemData(i);		if (pStr != NULL)			delete pStr;	}}void RxCommonList::OnDestroy() {	if (!m_bTag)		ClearAllData();	CListCtrl::OnDestroy();}void RxCommonList::SetNoOfColumn(int nNo, int aSortType[]){	m_nNoOfColumn = nNo;	if (m_pbSortAscending)		delete m_pbSortAscending;	m_pbSortAscending = new BOOL[m_nNoOfColumn];	if (m_pnSortType)		delete m_pnSortType;	m_pnSortType = new int[m_nNoOfColumn];	for (int i = 0; i < m_nNoOfColumn; i++) {		m_pbSortAscending[i] = TRUE;		m_pnSortType[i] = aSortType[i];	}}BOOL RxCommonList::GetSortOrder(int nColumn){	return m_pbSortAscending[nColumn];}BOOL RxCommonList::InvertSortOrder(int nColumn){	m_pbSortAscending[nColumn] = !m_pbSortAscending[nColumn];	return !m_pbSortAscending[nColumn];}int RxCommonList::GetSortType(int nColumn){	return m_pnSortType[nColumn];}

⌨️ 快捷键说明

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