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

📄 clistitem.cpp

📁 墨香最新私服
💻 CPP
字号:
// cListItem.cpp: implementation of the cListItem class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
//#include "cListItem.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
/*
template<class Type>
cListItem<Type>::cListItem()
{
	m_pItemList = new cLinkedList<Type>;
}
template<class Type>
cListItem<Type>::~cListItem()
{
	RemoveAll();
	SAFE_DELETE(m_pItemList);
}
template<class Type>
LONG cListItem<Type>::GetItemCount()
{
	return m_pItemList->GetCount();
}
template<class Type>
void cListItem<Type>::AddItem(char * str)
{
	Type * item = new Type;
	wsprintf(item->string, str);
	item->rgb = RGBA_MAKE(255,255,255,255);
	m_pItemList->AddTail(item);
}
template<class Type>
void cListItem<Type>::AddItem(char * str, LONG idx)
{
	Type * item = new Type;
	wsprintf(item->string, str);
	item->rgb = RGBA_MAKE(255,255,255,255);
	if(m_wMaxLine < GetItemCount())
		m_pItemList->DeleteHead();
	m_pItemList->InsertpAfter(item, idx);
}
template<class Type>
void cListItem<Type>::AddItem(char * str, DWORD color)
{
	Type * item = new Type;
	wsprintf(item->string, str);
	item->rgb = color;
	if(m_wMaxLine < GetItemCount())
		m_pItemList->DeleteHead();
		
	m_pItemList->AddTail(item);
}
template<class Type>
void cListItem<Type>::RemoveAll()
{
	m_pItemList->DeleteAll();
}
template<class Type>
void cListItem<Type>::RemoveItem(LONG idx)
{
	Type * item = m_pItemList->DeleteAt(idx);
	SAFE_DELETE(item);
}
template<class Type>
void cListItem<Type>::RemoveItem(char * str)
{
	POS pos = m_pItemList->GetFirstPos();
	Type * item = NULL;
	while (pos)
    {
        item = m_pItemList->GetNextPos(pos);
		if(strcmp(item->string, str) == 0)
		{
			m_pItemList->GetPrevPos(pos);
			m_pItemList->DeletePos(pos);
			SAFE_DELETE(item);
		}
	}
}
*/

⌨️ 快捷键说明

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