这篇教程C++ DeleteAllItems函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DeleteAllItems函数的典型用法代码示例。如果您正苦于以下问题:C++ DeleteAllItems函数的具体用法?C++ DeleteAllItems怎么用?C++ DeleteAllItems使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DeleteAllItems函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DeleteAllItemsvoid CSharedDirsTreeCtrl::InitalizeStandardItems(){ // add standard items DeleteAllItems(); delete m_pRootDirectoryItem; delete m_pRootUnsharedDirectries; FetchSharedDirsList(); m_pRootDirectoryItem = new CDirectoryItem(CString(""), TVI_ROOT); CDirectoryItem* pAll = new CDirectoryItem(CString(""), 0, SDI_ALL); pAll->m_htItem = InsertItem(TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE, GetResString(IDS_ALLSHAREDFILES), 0, 0, 0, 0, (LPARAM)pAll, TVI_ROOT, TVI_LAST); m_pRootDirectoryItem->liSubDirectories.AddTail(pAll); CDirectoryItem* pIncoming = new CDirectoryItem(CString(""), TVI_ROOT, SDI_INCOMING); pIncoming->m_htItem = InsertItem(TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE, GetResString(IDS_INCOMING_FILES), 2, 2, 0, 0, (LPARAM)pIncoming, TVI_ROOT, TVI_LAST); m_pRootDirectoryItem->liSubDirectories.AddTail(pIncoming); CDirectoryItem* pTemp = new CDirectoryItem(CString(""), TVI_ROOT, SDI_TEMP); pTemp->m_htItem = InsertItem(TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE, GetResString(IDS_INCOMPLETE_FILES), 1, 1, 0, 0, (LPARAM)pTemp, TVI_ROOT, TVI_LAST); m_pRootDirectoryItem->liSubDirectories.AddTail(pTemp); CDirectoryItem* pDir = new CDirectoryItem(CString(""), TVI_ROOT, SDI_DIRECTORY); pDir->m_htItem = InsertItem(TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE, GetResString(IDS_SHARED_DIRECTORIES), 5, 5, TVIS_EXPANDED, TVIS_EXPANDED, (LPARAM)pDir, TVI_ROOT, TVI_LAST); m_pRootDirectoryItem->liSubDirectories.AddTail(pDir); m_pRootUnsharedDirectries = new CDirectoryItem(CString(""), TVI_ROOT, SDI_FILESYSTEMPARENT); m_pRootUnsharedDirectries->m_htItem = InsertItem(TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN, GetResString(IDS_ALLDIRECTORIES), 4, 4, 0, 0, (LPARAM)m_pRootUnsharedDirectries, TVI_ROOT, TVI_LAST);}
开发者ID:machado2,项目名称:emule,代码行数:28,
示例2: DeleteAllItemsvoid CXTabCtrl::DeleteAllTabs(){ m_arrayStatusTab.RemoveAll(); DeleteAllItems();}
开发者ID:corefan,项目名称:nativetaskmanager,代码行数:7,
示例3: DeleteAllItems// the heading text is in the format of "text,width,format;text,width,format;..."BOOL CReportCtrl::SetColumnHeader(const CString& strHeadings){ DeleteAllItems(); DeleteAllColumns(); EndEdit(TRUE); BOOL bInserted = FALSE; CStringArray aLong, aShort; _StringSplit(strHeadings, aLong, _T(';')); for (int i = 0; i < aLong.GetSize(); i++) { _StringSplit(aLong[i], aShort, _T(',')); if (aShort.GetSize() > 0) { const int WIDTH = aShort.GetSize() > 1 ? _ttoi(aShort[1]) : 100; int nFormat = aShort.GetSize() > 2 ? _ttoi(aShort[2]) : 0; if (nFormat == 1) nFormat = LVCFMT_CENTER; else if (nFormat == 2) nFormat = LVCFMT_RIGHT; else nFormat = LVCFMT_LEFT; bInserted |= (InsertColumn(GetColumnCount(), aShort[0], nFormat, WIDTH) >= 0); } } return bInserted;}
开发者ID:KnowNo,项目名称:test-code-backup,代码行数:29,
示例4: DeleteAllItemsint StocksListCtrl::initVirtualListControl(int id, int col, bool asc){ stock_panel_->updateHeader(); /* Clear all the records */ DeleteAllItems(); wxListItem item; item.SetMask(wxLIST_MASK_IMAGE); item.SetImage(asc ? 3 : 2); SetColumn(col, item); m_stocks = Model_Stock::instance().find(Model_Stock::HELDAT(stock_panel_->accountID_)); sortTable(); int cnt = 0, selected_item = -1; for (const auto& stock: m_stocks) { if (id == stock.STOCKID) { selected_item = cnt; break; } ++cnt; } SetItemCount(m_stocks.size()); return selected_item;}
开发者ID:afeimsdn,项目名称:moneymanagerex,代码行数:28,
示例5: SetExtendedStylevoid CGitProgressList::Init(){ SetExtendedStyle (LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER); DeleteAllItems(); int c = ((CHeaderCtrl*)(GetDlgItem(0)))->GetItemCount()-1; while (c>=0) DeleteColumn(c--); CString temp; temp.LoadString(IDS_PROGRS_ACTION); InsertColumn(0, temp); temp.LoadString(IDS_PROGRS_PATH); InsertColumn(1, temp); m_pThread = AfxBeginThread(ProgressThreadEntry, this, THREAD_PRIORITY_NORMAL,0,CREATE_SUSPENDED); if (m_pThread==NULL) { ReportError(CString(MAKEINTRESOURCE(IDS_ERR_THREADSTARTFAILED))); } else { m_pThread->m_bAutoDelete = FALSE; m_pThread->ResumeThread(); } // Call this early so that the column headings aren't hidden before any // text gets added. ResizeColumns(); SetTimer(VISIBLETIMER, 300, NULL);}
开发者ID:545546460,项目名称:TortoiseGit,代码行数:32,
示例6: sourceFilevoid PHPOutlineTree::BuildTree(const wxFileName& filename){ m_filename = filename; PHPSourceFile sourceFile(filename, NULL); sourceFile.SetParseFunctionBody(false); sourceFile.Parse(); wxWindowUpdateLocker locker(this); DeleteAllItems(); wxTreeItemId root = AddRoot(wxT("Root")); wxImageList* images = new wxImageList(clGetScaledSize(16), clGetScaledSize(16), true); images->Add(m_manager->GetStdIcons()->LoadBitmap(wxT("cc/16/globals"))); // 0 images->Add(m_manager->GetStdIcons()->LoadBitmap(wxT("cc/16/function_private"))); // 1 images->Add(m_manager->GetStdIcons()->LoadBitmap(wxT("cc/16/function_protected"))); // 2 images->Add(m_manager->GetStdIcons()->LoadBitmap(wxT("cc/16/function_public"))); // 3 images->Add(m_manager->GetStdIcons()->LoadBitmap(wxT("cc/16/member_private"))); // 4 images->Add(m_manager->GetStdIcons()->LoadBitmap(wxT("cc/16/member_protected"))); // 5 images->Add(m_manager->GetStdIcons()->LoadBitmap(wxT("cc/16/member_public"))); // 6 images->Add(m_manager->GetStdIcons()->LoadBitmap(wxT("cc/16/namespace"))); // 7 images->Add(m_manager->GetStdIcons()->LoadBitmap(wxT("cc/16/class"))); // 8 images->Add(m_manager->GetStdIcons()->LoadBitmap(wxT("cc/16/enumerator"))); // 9 AssignImageList(images); // Build the tree view BuildTree(root, sourceFile.Namespace()); if(HasChildren(GetRootItem())) { ExpandAll(); }}
开发者ID:lpc1996,项目名称:codelite,代码行数:31,
示例7: DeleteAllItems// feedId = 0 => all feeds; otherwise feedId = RssFeeds.rowidvoid CRssView::SetFeed(int feedId){ if(feedId != m_feedId) DeleteAllItems(); m_feedId = feedId; Refresh();}
开发者ID:dpnchl,项目名称:newzflow2,代码行数:8,
示例8: DeleteAllItems void FilterListCtrl::UpdateList() { DeleteAllItems(); CString clsid_str; CString guid_search_str(search_str); guid_search_str.Replace(_T("0X"), _T("")); const TCHAR delimiters[] = _T(" /t-,{}()=/;UL"); // remove commonly used C++ GUID delimiters and match by remaining hex digits for (int n=0; n<sizeof(delimiters)/sizeof(delimiters[0]); n++) guid_search_str.Remove(delimiters[n]); for (int i=0; i<filters.GetCount(); i++) { DSUtil::FilterTemplate &filter = filters[i]; if (CString(filter.name).MakeUpper().Find(search_str) < 0) { CLSIDToString(filter.clsid, clsid_str); clsid_str.Remove(_T('-')); // remove hex separators generated by CLSIDToString if (clsid_str.Find(guid_search_str) < 0) { continue; } } const int item = InsertItem(LVIF_PARAM | LVIF_TEXT, 0, filter.name, 0, 0, 0, (LPARAM)&filter); SetItemData(item, (DWORD_PTR)&filter); } }
开发者ID:EnigmaIndustries,项目名称:graph-studio-next,代码行数:25,
示例9: bmImagevoid CViewTree::OnInitialUpdate(){ //set the image lists m_imlNormal.Create(16, 15, ILC_COLOR32 | ILC_MASK, 1, 0); CBitmap bmImage(IDB_CLASSVIEW); m_imlNormal.Add( &bmImage, RGB(255, 0, 0) ); SetImageList(&m_imlNormal, LVSIL_NORMAL); // Adjust style to show lines and [+] button DWORD dwStyle = (DWORD)GetWindowLongPtr(GWL_STYLE); dwStyle |= TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT; SetWindowLongPtr(GWL_STYLE, dwStyle); DeleteAllItems(); // Add some tree-view items HTREEITEM htiRoot = AddItem(NULL, _T("TreeView"), 0); HTREEITEM htiCTreeViewApp = AddItem(htiRoot, _T("CTreeViewApp"), 1); AddItem(htiCTreeViewApp, _T("CTreeViewApp()"), 3); AddItem(htiCTreeViewApp, _T("GetMainFrame()"), 3); AddItem(htiCTreeViewApp, _T("InitInstance()"), 3); HTREEITEM htiMainFrame = AddItem(htiRoot, _T("CMainFrame"), 1); AddItem(htiMainFrame, _T("CMainFrame()"), 3); AddItem(htiMainFrame, _T("OnCommand()"), 4); AddItem(htiMainFrame, _T("OnInitialUpdate()"), 4); AddItem(htiMainFrame, _T("WndProc()"), 4); HTREEITEM htiView = AddItem(htiRoot, _T("CView"), 1); AddItem(htiView, _T("CView()"), 3); AddItem(htiView, _T("OnInitialUpdate()"), 4); AddItem(htiView, _T("WndProc()"), 4); // Expand some tree-view items Expand(htiRoot, TVE_EXPAND); Expand(htiCTreeViewApp, TVE_EXPAND);}
开发者ID:quinsmpang,项目名称:Tools,代码行数:35,
示例10: ShowWindowvoid CIrcNickListCtrl::RefreshNickList( CString sChannel ){ //Hide nickList to speed things up.. ShowWindow(SW_HIDE); DeleteAllItems(); Channel* refresh = m_pParent->m_tabctrlChannelSelect.FindChannelByName( sChannel ); if( !refresh ) { //This is not a channel??? shouldn't happen.. UpdateNickCount(); ShowWindow(SW_SHOW); return; } POSITION pos1, pos2; Nick* pCurrNick = NULL; int iItemr = -1; for (pos1 = refresh->m_ptrlistNicks.GetHeadPosition();( pos2 = pos1 ) != NULL;) { //Add all nicks to list.. refresh->m_ptrlistNicks.GetNext(pos1); pCurrNick = (Nick*)refresh->m_ptrlistNicks.GetAt(pos2); iItemr = GetItemCount(); iItemr = InsertItem(LVIF_PARAM,iItemr,0,0,0,0,(LPARAM)pCurrNick); SetItemText(iItemr,0,(LPCTSTR)pCurrNick->m_sNick); SetItemText(iItemr,1,(LPCTSTR)pCurrNick->m_sModes); } UpdateNickCount(); ShowWindow(SW_SHOW);}
开发者ID:LjApps,项目名称:eMule-VeryCD,代码行数:29,
示例11: DeleteAllItemsDBTreeCtrl::~DBTreeCtrl(){ if (!IsEmpty()) { DeleteAllItems(); }}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:7,
示例12: deletevoid CKeyframeList::ResetList(){ for(int i= 0; i < GetItemCount(); i++){ delete (KeyFrame*) GetItemData(i); } DeleteAllItems();}
开发者ID:flyskyosg,项目名称:osgkeyframer,代码行数:7,
示例13: SetRedrawvoid CFeedIcoItemListCtrl::FilterItemsBySearchKey(CString* pSearchKey){ if (!IsWindowVisible()) return; if (pSearchKey == NULL || pSearchKey->IsEmpty()) { if (m_stringMatcher.IsOriginal()) return; } const StringMatcher::ListItemsNeedShow& listItemsNeedShow = m_stringMatcher.GetMatchResult(pSearchKey); SetRedraw(FALSE); RemoveAllGroups();//删除分组 RemoveAllGroupData();//删除m_mapGroups DeleteAllItems();//删除items for (StringMatcher::ListItemsNeedShow::const_iterator ix = listItemsNeedShow.begin(); ix != listItemsNeedShow.end(); ++ix) { CRssFeed* listKey = (CRssFeed*)*ix; CString strCaption = GetExtentString( listKey->GetDisplayName() ); int nRet = InsertItem(GetItemCount(), strCaption); this->SetItemData(nRet, LPARAM(listKey)); } GroupAllFeedsByType(0); SetRedraw(TRUE);}
开发者ID:techpub,项目名称:archive-code,代码行数:31,
示例14: Freezevoid ProcList::showList(int highlight){ int c = 0; Freeze(); DeleteAllItems(); for (std::vector<Database::Item>::const_iterator i = list.items.begin(); i != list.items.end(); i++) { const Database::Symbol *sym = i->symbol; double inclusive = i->inclusive; double exclusive = i->exclusive; float inclusivepercent = i->inclusive * 100.0f / list.totalcount; float exclusivepercent = i->exclusive * 100.0f / list.totalcount; InsertItem(c, sym->procname.c_str(), -1); if(sym->isCollapseFunction || sym->isCollapseModule) { SetItemTextColour(c,wxColor(0,128,0)); } setColumnValue(c, COL_EXCLUSIVE, wxString::Format("%0.2fs",exclusive)); setColumnValue(c, COL_INCLUSIVE, wxString::Format("%0.2fs",inclusive)); setColumnValue(c, COL_EXCLUSIVEPCT, wxString::Format("%0.2f%%",exclusivepercent)); setColumnValue(c, COL_INCLUSIVEPCT, wxString::Format("%0.2f%%",inclusivepercent)); setColumnValue(c, COL_SAMPLES, wxString::Format("%0.2fs",exclusive)); setColumnValue(c, COL_CALLSPCT, wxString::Format("%0.2f%%",exclusivepercent)); setColumnValue(c, COL_MODULE, sym->module.c_str()); setColumnValue(c, COL_SOURCEFILE, sym->sourcefile.c_str()); setColumnValue(c, COL_SOURCELINE, ::toString(sym->sourceline).c_str()); c++; } this->SetItemState(highlight, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED); Thaw(); EnsureVisible(highlight);}
开发者ID:CyberShadow,项目名称:verysleepy-1,代码行数:35,
示例15: DeleteAllItemsvoid CSitesWnd::OnForceUpdate(){ DeleteAllItems (); int cSites = _SitesMgr.GetSiteCount (); for (int i = 0; i < cSites; i++) AddSiteToList (_SitesMgr.GetSite (i));}
开发者ID:naroya,项目名称:fdm,代码行数:7,
示例16: DeleteAllItemsBOOL CDirTreeCtrl::DisplayDrives(){ // // Displaying the Availible Drives on this PC // This are the First Items in the TreeCtrl // DeleteAllItems(); TCHAR szDrives[128]; TCHAR* pDrive; if ( !GetLogicalDriveStrings( sizeof(szDrives), szDrives ) ) { m_strError = "Error Getting Logical DriveStrings!"; return FALSE; } pDrive = szDrives; while( *pDrive ) { HTREEITEM hParent = AddItem( TVI_ROOT, pDrive ); if(_tcsicmp(pDrive,_T("A://"))!=0) { if ( FindSubDir( pDrive ) ) InsertItem( _T(""), 0, 0, hParent ); } pDrive += _tcslen( pDrive ) + 1; } return TRUE;}
开发者ID:AutoCAD-DCI,项目名称:CADTools,代码行数:32,
示例17: GetStyleBOOL CDirTreeCtrl::DisplayTree(LPCTSTR strRoot, BOOL bFiles){ DWORD dwStyle = GetStyle(); // read the windowstyle if ( dwStyle & TVS_EDITLABELS ) { // Don't allow the user to edit ItemLabels ModifyStyle( TVS_EDITLABELS , 0 ); } // Display the DirTree with the Rootname e.g. C:/ // if Rootname == NULL then Display all Drives on this PC // First, we need the system-ImageList DeleteAllItems(); if ( !GetSysImgList() ) return FALSE; m_bFiles = bFiles; // if TRUE, Display Path- and Filenames if ( strRoot == NULL || strRoot[0] == '/0' ) { if ( !DisplayDrives() ) return FALSE; m_strRoot = _T(""); } else { m_strRoot = strRoot; if ( m_strRoot.Right(1) != '//' ) m_strRoot += _T("//"); HTREEITEM hParent = AddItem( TVI_ROOT, m_strRoot ); DisplayPath( hParent, strRoot ); } return TRUE; }
开发者ID:AutoCAD-DCI,项目名称:CADTools,代码行数:34,
示例18: DeleteAllItemsvoid CTDLFindTaskExpressionListCtrl::BuildListCtrl(){ DeleteAllItems(); for (int nParam = 0; nParam < GetRuleCount(); nParam++) { const SEARCHPARAM& sp = m_aSearchParams[nParam]; // attrib CString sAttrib = m_cbAttributes.GetAttributeName(sp); int nItem = InsertItem(nParam, sAttrib); // operator CString sOp = GetOpName(sp.GetOperator()); SetItemText(nItem, OPERATOR, sOp); // value UpdateValueColumnText(nItem); // and/or (but not for last row) if (nParam < GetRuleCount() - 1) { CEnString sAndOr(sp.GetAnd() ? IDS_FP_AND : IDS_FP_OR); SetItemText(nItem, ANDOR, sAndOr); } } ValidateListData(); SetCurSel(0);}
开发者ID:Fox-Heracles,项目名称:TodoList,代码行数:30,
示例19: ImageList_Createvoid CViewClasses::OnInitialUpdate(){ //set the image lists m_himlNormal = ImageList_Create(16, 15, ILC_COLOR32 | ILC_MASK, 1, 0); HBITMAP hbm = LoadBitmap(MAKEINTRESOURCE(IDB_CLASSVIEW)); ImageList_AddMasked(m_himlNormal, hbm, RGB(255, 0, 0)); SetImageList(m_himlNormal, LVSIL_NORMAL); ::DeleteObject(hbm); // Adjust style to show lines and [+] button DWORD dwStyle = (DWORD)GetWindowLongPtr(GWL_STYLE); dwStyle |= TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT; SetWindowLongPtr(GWL_STYLE, dwStyle); DeleteAllItems(); // Add some tree-view items HTREEITEM htiRoot = AddItem(NULL, _T("TreeView"), 0); HTREEITEM htiCTreeViewApp = AddItem(htiRoot, _T("CTreeViewApp"), 1); AddItem(htiCTreeViewApp, _T("CTreeViewApp()"), 3); AddItem(htiCTreeViewApp, _T("GetMainFrame()"), 3); AddItem(htiCTreeViewApp, _T("InitInstance()"), 3); HTREEITEM htiMainFrame = AddItem(htiRoot, _T("CMainFrame"), 1); AddItem(htiMainFrame, _T("CMainFrame()"), 3); AddItem(htiMainFrame, _T("OnCommand()"), 4); AddItem(htiMainFrame, _T("OnInitialUpdate()"), 4); AddItem(htiMainFrame, _T("WndProc()"), 4); HTREEITEM htiView = AddItem(htiRoot, _T("CView"), 1); AddItem(htiView, _T("CView()"), 3); AddItem(htiView, _T("OnInitialUpdate()"), 4); AddItem(htiView, _T("WndProc()"), 4); // Expand some tree-view items Expand(htiRoot, TVE_EXPAND); Expand(htiCTreeViewApp, TVE_EXPAND);}
开发者ID:wyrover,项目名称:win32-framework,代码行数:32,
示例20: SendMessagevoid CDirectoryTreeCtrl::Init(void){ SendMessage(CCM_SETUNICODEFORMAT, TRUE); ShowWindow(SW_HIDE); DeleteAllItems(); ModifyStyle( 0, TVS_CHECKBOXES ); // START: added by FoRcHa ///////////// WORD wWinVer = thePrefs.GetWindowsVersion(); // maybe causes problems on 98 & nt4 if(wWinVer == _WINVER_2K_ || wWinVer == _WINVER_XP_ || wWinVer == _WINVER_ME_) { SHFILEINFO shFinfo; HIMAGELIST hImgList = NULL; // Get the system image list using a "path" which is available on all systems. [patch by bluecow] hImgList = (HIMAGELIST)SHGetFileInfo(_T("."), 0, &shFinfo, sizeof(shFinfo), SHGFI_SYSICONINDEX | SHGFI_SMALLICON); if(!hImgList) { TRACE(_T("Cannot retrieve the Handle of SystemImageList!")); //return; } m_image.m_hImageList = hImgList; SetImageList(&m_image, TVSIL_NORMAL); } //////////////////////////////// TCHAR drivebuffer[500]; ::GetLogicalDriveStrings(ARRSIZE(drivebuffer), drivebuffer); // e.g. "a:/ c:/ d:/" const TCHAR* pos = drivebuffer; while(*pos != _T('/0')){ // Copy drive name TCHAR drive[4]; _tcsncpy(drive, pos, ARRSIZE(drive)); drive[ARRSIZE(drive) - 1] = _T('/0'); switch(drive[0]){ case _T('a'): case _T('A'): case _T('b'): case _T('B'): // Skip floppy disk break; default: drive[2] = _T('/0'); AddChildItem(NULL, drive); // e.g. ("c:") } // Point to the next drive (4 chars interval) pos = &pos[4]; } // VC-kernel[2007-02-13]: //ShowWindow(SW_SHOW);}
开发者ID:kevinzhwl,项目名称:easyMuleVeryCD,代码行数:60,
示例21: DeleteAllItemsvoid ThreadList::updateThreads(const ProcessInfo* processInfo, SymbolInfo *symInfo){ this->selected_threads.clear(); DeleteAllItems(); this->threads.clear(); ok_button->Enable(false); all_button->Enable(false); if(processInfo != NULL) { this->process_handle = processInfo->getProcessHandle(); this->syminfo = symInfo; this->threads = processInfo->threads; int numDisplayedThreads = getNumDisplayedThreads(); for(int i=0; i<numDisplayedThreads; ++i) { long tmp = this->InsertItem(i, "", -1); SetItemData(tmp, i); } all_button->Enable(this->threads.size() != 0); lastTime = wxGetLocalTimeMillis(); updateTimes(); updateSorting(); fillList(); }}
开发者ID:VerySleepy,项目名称:verysleepy,代码行数:30,
示例22: DeleteAllItemsvoid CReportCtrl::ResetControl(int Rows){ m_SortCol = -1; m_SortDir = 0; DeleteAllItems(); SetItemCount(Rows); // allocate memory in advance}
开发者ID:victimofleisure,项目名称:WaveShop,代码行数:7,
示例23: DeleteAllItemsvoid CFileListView::ShowFileInfo( FileInfo& Item ){ UInt32 nIndex = 0; DeleteAllItems(); if(m_FileStack.size() > 1) { InsertItem(nIndex, "..",1); SetSubItem(nIndex, 1, DIR_STR); SetSubItem(nIndex, 2, DIR_STR); ++nIndex; } for (UInt32 i = 0; i < Item.Chlids.size(); ++i,++nIndex) { FileInfo& info = Item.Chlids[i]; InsertItem(nIndex, info.szName, info.nFileSize ? 0 : 1); if(info.nFileSize > 0) { SetSubItem(nIndex, 1, (char*)ConvertSize(info.nFileSize)); SetSubItem(nIndex, 2, (char*)ConvertSize(info.nCompSize)); SetSubItem(nIndex, 4, info.bDataComplete ? "Y" : "N"); } else { SetSubItem(nIndex, 1, DIR_STR); SetSubItem(nIndex, 2, DIR_STR); } if(info.FileTime != 0) SetSubItem(nIndex, 3, (char*)ConvertTime(&(info.FileTime))); }}
开发者ID:huairen,项目名称:JArchive,代码行数:35,
示例24: Freezebool WIDGET_HOTKEY_LIST::TransferDataToControl(){ Freeze(); DeleteAllItems(); m_hotkeys.clear(); for( size_t sec_index = 0; sec_index < m_sections.size(); ++sec_index ) { // LoadSection pushes into m_hotkeys LoadSection( m_sections[sec_index].m_section ); wxASSERT( m_hotkeys.size() == sec_index + 1 ); wxString section_tag = *( m_sections[sec_index].m_section->m_SectionTag ); // Create parent tree item wxTreeListItem parent = AppendItem( GetRootItem(), m_sections[sec_index].m_name ); HOTKEY_LIST& each_list = m_hotkeys[sec_index]; HOTKEY_LIST::iterator hk_it; for( hk_it = each_list.begin(); hk_it != each_list.end(); ++hk_it ) { wxTreeListItem item = AppendItem( parent, wxEmptyString ); SetItemData( item, new WIDGET_HOTKEY_CLIENT_DATA( &*hk_it, section_tag ) ); } Expand( parent ); } UpdateFromClientData(); Thaw(); return true;}
开发者ID:nakijun,项目名称:kicad-source-mirror,代码行数:34,
示例25: RebuildList // This method clears the list and adds contacts again, according to the current filter settings. void RebuildList() { LPSTR pszProto; MTime mtNow; MAnnivDate ad; int i = 0; DWORD age = 0; WORD wDaysBefore = db_get_w(NULL, MODNAME, SET_REMIND_OFFSET, DEFVAL_REMIND_OFFSET); WORD numMale = 0; WORD numFemale = 0; WORD numContacts = 0; WORD numBirthContacts = 0; ShowWindow(_hList, SW_HIDE); DeleteAllItems(); mtNow.GetLocalTime(); // insert the items into the list for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { // ignore meta subcontacts here, as they are not interesting. if (!db_mc_isSub(hContact)) { // filter protocol pszProto = Proto_GetBaseAccountName(hContact); if (pszProto) { numContacts++; switch (GenderOf(hContact, pszProto)) { case 'M': numMale++; break; case 'F': numFemale++; } if (!ad.DBGetBirthDate(hContact, pszProto)) { age += ad.Age(&mtNow); numBirthContacts++; // add birthday if ((_filter.bFilterIndex != FILTER_ANNIV) && (!_filter.pszProto || !_strcmpi(pszProto, _filter.pszProto))) AddRow(hContact, pszProto, ad, mtNow, wDaysBefore); } // add anniversaries if (_filter.bFilterIndex != FILTER_BIRTHDAY && (!_filter.pszProto || !_strcmpi(pszProto, _filter.pszProto))) for (i = 0; !ad.DBGetAnniversaryDate(hContact, i); i++) if (!_filter.pszAnniv || !mir_tstrcmpi(_filter.pszAnniv, ad.Description())) AddRow(hContact, pszProto, ad, mtNow, wDaysBefore); } } } ListView_SortItemsEx(_hList, (CMPPROC)cmpProc, this); ShowWindow(_hList, SW_SHOW); // display statistics SetDlgItemInt(_hDlg, TXT_NUMBIRTH, numBirthContacts, FALSE); SetDlgItemInt(_hDlg, TXT_NUMCONTACT, numContacts, FALSE); SetDlgItemInt(_hDlg, TXT_FEMALE, numFemale, FALSE); SetDlgItemInt(_hDlg, TXT_MALE, numMale, FALSE); SetDlgItemInt(_hDlg, TXT_AGE, numBirthContacts > 0 ? (age - (age % numBirthContacts)) / numBirthContacts : 0, FALSE); }
开发者ID:Seldom,项目名称:miranda-ng,代码行数:61,
示例26: DeleteAllItemsvoid KeyListCtrl::Update(){ m_frame_text->Hide(); m_duration_text->Hide(); m_interpolation_cmb->Hide(); m_description_text->Hide(); m_editing_item = -1; VRenderFrame* vr_frame = (VRenderFrame*)m_frame; if (!vr_frame) return; Interpolator* interpolator = vr_frame->GetInterpolator(); if (!interpolator) return; DeleteAllItems(); for (int i=0; i<interpolator->GetKeyNum(); i++) { int id = interpolator->GetKeyID(i); int time = interpolator->GetKeyTime(i); int duration = interpolator->GetKeyDuration(i); int interp = interpolator->GetKeyType(i); string desc = interpolator->GetKeyDesc(i); Append(id, time, duration, interp, desc); }}
开发者ID:takashi310,项目名称:VVD_Viewer,代码行数:26,
示例27: Freezevoid WIDGET_HOTKEY_LIST::updateShownItems( const wxString& aFilterStr ){ Freeze(); DeleteAllItems(); HOTKEY_FILTER filter( aFilterStr ); for( auto& section: m_hk_store.GetSections() ) { // Create parent tree item wxTreeListItem parent = AppendItem( GetRootItem(), section.m_name ); for( auto& hotkey: section.m_hotkeys ) { if( filter.FilterMatches( hotkey.GetCurrentValue() ) ) { wxTreeListItem item = AppendItem( parent, wxEmptyString ); SetItemData( item, new WIDGET_HOTKEY_CLIENT_DATA( hotkey ) ); } } Expand( parent ); } UpdateFromClientData(); Thaw();}
开发者ID:Lotharyx,项目名称:kicad-source-mirror,代码行数:27,
示例28: DeleteAllItemsvoid CGitRefCompareList::Show(){ DeleteAllItems(); std::sort(m_RefList.begin(), m_RefList.end(), SortPredicate); int index = 0; for (const auto& entry : m_RefList) { if (entry.changeType == ChangeType::Same && m_bHideUnchanged) continue; int nImage = -1; if (entry.refType == CGit::REF_TYPE::LOCAL_BRANCH) nImage = 1; else if (entry.refType == CGit::REF_TYPE::REMOTE_BRANCH) nImage = 2; else if (entry.refType == CGit::REF_TYPE::TAG) nImage = 0; InsertItem(index, entry.shortName, nImage); SetItemText(index, colChange, entry.change); SetItemText(index, colOldHash, entry.oldHash); SetItemText(index, colOldMessage, entry.oldMessage); SetItemText(index, colNewHash, entry.newHash); SetItemText(index, colNewMessage, entry.newMessage); index++; }}
开发者ID:hongzuL,项目名称:TortoiseGit,代码行数:26,
示例29: DeleteAllItemsvoid CXTPDockingPaneTabbedContainer::OnTabsChanged(){ if (!m_hWnd) return; m_nLockReposition += 1; DeleteAllItems(); m_bCloseItemButton = GetDockingPaneManager()->m_bShowCloseTabButton; POSITION pos = GetHeadPosition(); while (pos) { CXTPDockingPane* pPane = (CXTPDockingPane*)GetNext(pos); CXTPTabManagerItem* pItem = AddItem(GetItemCount()); if (m_pSelectedPane == pPane) SetSelectedItem(pItem); pItem->SetCaption(pPane->GetTabCaption()); pItem->SetColor(pPane->GetItemColor()); pItem->SetTooltip(pPane->GetTitle()); pItem->SetEnabled(pPane->GetEnabled() & xtpPaneEnableClient); pItem->SetClosable((pPane->GetOptions() & xtpPaneNoCloseable) == 0); pItem->SetData((DWORD_PTR)pPane); } ////////////////////////////////////////////////////////////////////////// m_pCaptionButtons->CheckForMouseOver(CPoint(-1, -1)); m_nLockReposition -= 1;}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:33,
注:本文中的DeleteAllItems函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ DeleteArray函数代码示例 C++ DeleteAll函数代码示例 |