📄 zlistproperties.cpp
字号:
// zListProperties.cpp: implementation of the zListProperties class.
//
//////////////////////////////////////////////////////////////////////
#include "../stdafx.h"
#include "zListProperties.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
zListProperties::zListProperties()
{
}
zListProperties::~zListProperties()
{
}
int zListProperties::GetSize()
{
return (int)vProperties.size();
}
void zListProperties::ResetProperties()
{
vProperties.clear();
}
int zListProperties::DeleteProperties(int n)
{
int size = (int)vProperties.size();
if (n>=size) return -1;
vProperties.erase(vProperties.begin()+n);
return GetSize();
}
int zListProperties::AddProperties(int nType,TCHAR * pTitle,TCHAR * pName,long nParam)
{
ITEMPROPERTIES ippts;
ippts.nType = nType;
_tcsncpy(ippts.szTitle,pTitle,sizeof(ippts.szTitle)/sizeof(TCHAR));
if(_tcslen(pName)<=0)
{
zControl::GetTmpAttribName(ippts.szName,sizeof(ippts.szName)/sizeof(TCHAR));
}else
_tcsncpy(ippts.szName,pName,sizeof(ippts.szName)/sizeof(TCHAR));
ippts.nParam = nParam;
vProperties.push_back(ippts);
return GetSize();
}
int zListProperties::GetType(int n)
{
int size = (int)vProperties.size();
if (n>=size) return -1;
return vProperties[n].nType;
}
TCHAR * zListProperties::GetTitle(int n)
{
int size = (int)vProperties.size();
if (n>=size) return NULL;
return vProperties[n].szTitle;
}
TCHAR * zListProperties::GetName(int n)
{
int size = (int)vProperties.size();
if (n>=size) return NULL;
return vProperties[n].szName;
}
long zListProperties::GetParam(int n)
{
int size = (int)vProperties.size();
if (n>=size) return -1;
return vProperties[n].nParam;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -