本文整理汇总了C++中CStrList::GetCount方法的典型用法代码示例。如果您正苦于以下问题:C++ CStrList::GetCount方法的具体用法?C++ CStrList::GetCount怎么用?C++ CStrList::GetCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStrList
的用法示例。
在下文中一共展示了CStrList::GetCount方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DisplayNewTypeList
// =====================================================================
void insmm::DisplayNewTypeList(void)
// =====================================================================
// Format of .INF-files: 00000001.WAV,name & surname,fido address
// old: 00000001.WAV,deutsch description,englisch description
{
int i,n,ret;
FILE *fp;
char buf[300];
char tmp[300];
char name[300];
char addr[300];
CString help1;
CString help2;
CStrList inffiles;
CStrList mmfiles;
UpdateData(1);
make_path(tmp,gc.MultimedPath,"*.inf");
infolist.RemoveAll();
inffiles.FillWithFiles(tmp);
for (i=0;i<inffiles.GetCount();i++)
{
make_path(tmp,gc.MultimedPath,inffiles.GetString(i));
fp=fopen(tmp,"rt");
if (fp)
{
while (fgets(buf,299,fp))
{
if (strchr(" ;/",buf[0]) || strlen(buf)<4)
continue;
infolist.AddTail(buf);
}
fclose(fp);
}
}
make_path(tmp,gc.MultimedPath,m_mmtype==0 ? "*.bmp":"*.wav");
mmstuff.RemoveAll();
mmfiles.FillWithFiles(tmp);
for (i=0;i<mmfiles.GetCount();i++)
{
help1=mmfiles.GetString(i);
for (n=0;n<infolist.GetCount();n++)
{
help2=infolist.GetString(n);
if (!strnicmp(help1,help2,help1.GetLength()))
{
name[0]=addr[0]=0;
ret=sscanf(help2,"%[^,]%[, ]%[^,]%[ ,]%[^\n,]",tmp,tmp,name,tmp,addr);
if (ret!=5)
break;
sprintf(buf,"%s\t%s\t%s",help1,name,addr);
mmstuff.AddTail(buf);
break;
}
}
}
UPDATE_LB(mmstuff,IDC_LIST);
}
示例2: get_period_by_zone
// ===========================================================
// searches the time-period by the specified zone, returns string "UNIT CHARGESTRING"
void get_period_by_zone(const char *zone,CString &period)
// ===========================================================
{
CString str,tmp;
struct tm *loctime;
time_t tim;
period.Empty();
for (int t=0;t<costbaselist.GetCount();t++)
{
str=costbaselist.GetString(t);
get_token(str,BASEZONE,tmp);
if (!tmp.CompareNoCase(zone))
{
time(&tim); /* Get time as long integer. */
loctime = localtime(&tim); /* Convert to local time. */
if (loctime->tm_wday == 0 || loctime->tm_wday == 6)
get_token(str,BASEWEND,period); // weekend
else
get_token(str,BASEWDAY,period); // workdays
get_token(str,BASECURR,tmp); // currency
strcpy(currency,tmp);
get_token(str,BASEPERU,tmp); // charging per unit
period = tmp+" "+period;
return;
}
}
}
示例3: get_current_zone
// ===========================================================
// searches for valid charging-period, if not found, the default-string is returned
void get_current_zone(char *timeperiods)
// ===========================================================
{
CString str;
CString tmp;
size_t matchlen=0;
*timeperiods=0;
for (int t=0;t<costuserlist.GetCount();t++)
{
str=costuserlist.GetString(t);
get_token(str,USERPHON,tmp);
if (!timeperiods[0] && (!stricmp(tmp,"default") || !stricmp(tmp,"по умолчанию")))
{
get_token(str,USERZONE,tmp);
strcpy(chargzone,tmp);
get_period_by_zone(chargzone,tmp);
strcpy(timeperiods,tmp); // defaultvalue found
}
else if (!strncmp(curphone,tmp,strlen(tmp)) && strlen(tmp)>matchlen)
// search maximum similarity to curphone in costuser
{
matchlen = strlen(tmp);
get_token(str,USERZONE,tmp);
strcpy(chargzone,tmp);
get_period_by_zone(chargzone,tmp);
strcpy(timeperiods,tmp);
}
}
}
示例4: OnInitDialog
// ===========================================================================
BOOL receiver::OnInitDialog()
// ===========================================================================
{
CString str;
int tabs[]={60,170};
int tabs2[]={100};
int lng[]={
IDC_ADD1,
IDC_ADD2,
IDC_CHANGE1,
IDC_CHANGE2,
IDC_DELETE1,
IDC_DELETE2,
IDC_STATIC1,
IDC_STATIC2,
IDC_STATIC4,
IDC_STATIC3,
IDC_STATIC5,
IDC_IMPORT,
};
CDialog::OnInitDialog();
set_dlg_language(this,DlgName,lng,sizeof(lng)/sizeof(int));
TAB_LIST(m_groups,tabs2);
TAB_LIST(m_members,tabs);
for (int i=0;i<Agroups.GetCount();i++)
{
str=Agroups.GetString(i);
str.Trim();
m_groups.AddString(str);
}
SET_SEL(m_groups,0);
OnLbnSelchangeGroups();
return TRUE;
}
示例5: populate_lists
// ===========================================================================
void receiver::populate_lists()
// ===========================================================================
{
CString help,group;
int i;
m_groups.ResetContent();
m_members.ResetContent();
for (i=0;i<Agroups.GetCount();i++)
{
help=Agroups.GetString(i);
get_token(help,0,group);
m_groups.AddString(group);
}
}
示例6: OnInitDialog
// =================================================================
BOOL cfgexfr::OnInitDialog()
// =================================================================
{
int lng[]={
IDC_STATIC2,
IDC_CHECK_16BIT,
IDCANCEL,
IDOK
};
CDialog::OnInitDialog();
set_dlg_language(this,DlgName,lng,sizeof(lng)/sizeof(int));
if (exfrcfg.GetCount()>1)
{
m_edit_path.SetWindowText(exfrcfg.GetString(0));
m_check_16bit.SetCheck(exfrcfg.GetString(1)=="1" ? 1 : 0);
}
return TRUE;
}