本文整理汇总了C++中PtrList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ PtrList::begin方法的具体用法?C++ PtrList::begin怎么用?C++ PtrList::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PtrList
的用法示例。
在下文中一共展示了PtrList::begin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: displayPage
void CSearchResultDlg::displayPage(int page, BOOL showStatus)
{
if (page < 0 || page >= pageCount)
return;
if (showStatus) {
CString str;
str.Format(IDS_SEARCH_PAGE_NO, page + 1);
SetDlgItemText(IDC_STATUS, str);
}
PtrList *l = pages[page];
PtrList::iterator it;
for (it = l->begin(); it != l->end(); ++it) {
SEARCH_RESULT *p = (SEARCH_RESULT *) *it;
int image = p->face;
if (!p->online)
image += NR_FACES;
CString str;
str.Format("%lu", p->uin);
int i = m_ctlResult.InsertItem(m_ctlResult.GetItemCount(), str, image);
m_ctlResult.SetItemData(i, (DWORD) p);
m_ctlResult.SetItemText(i, 1, p->nick.c_str());
m_ctlResult.SetItemText(i, 2, p->province.c_str());
}
}
示例2: deleteResults
void CSearchResultDlg::deleteResults()
{
for (int i = 0; i < pageCount; i++) {
PtrList *l = pages[i];
PtrList::iterator it;
for (it = l->begin(); it != l->end(); ++it)
delete (SEARCH_RESULT *) *it;
l->clear();
}
curPage = -1;
pageCount = 0;
startUIN = 0;
}
示例3: onGroupListReply
void CGroupSearchResultPage::onGroupListReply(PtrList &l)
{
CGroupSearchWizard *wiz = (CGroupSearchWizard *) GetParent();
int type = wiz->typePage.getGroupType();
PtrList::iterator it;
for (it = l.begin(); it != l.end(); ++it) {
GROUP_INFO *p = (GROUP_INFO *) *it;
p->type = type;
addResult(p);
}
GetDlgItem(IDC_REFRESH)->EnableWindow();
}