当前位置: 首页>>代码示例>>C++>>正文


C++ ListView_DeleteAllItems函数代码示例

本文整理汇总了C++中ListView_DeleteAllItems函数的典型用法代码示例。如果您正苦于以下问题:C++ ListView_DeleteAllItems函数的具体用法?C++ ListView_DeleteAllItems怎么用?C++ ListView_DeleteAllItems使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ListView_DeleteAllItems函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LoadAtomTable

static VOID LoadAtomTable(VOID)
{
    PATOM_TABLE_INFORMATION atomTable = NULL;

    ListView_DeleteAllItems(ListViewWndHandle);

    if (!NT_SUCCESS(PhEnumAtomTable(&atomTable)))
        return;

    for (ULONG i = 0; i < atomTable->NumberOfAtoms; i++)
    {
        PATOM_BASIC_INFORMATION atomInfo = NULL;

        if (!NT_SUCCESS(PhQueryAtomTableEntry(atomTable->Atoms[i], &atomInfo)))
        {
            PhAddListViewItem(ListViewWndHandle, MAXINT, PhaFormatString(L"(Error) #%lu", i)->Buffer, NULL);
            continue;
        }

        if ((atomInfo->Flags & RTL_ATOM_PINNED) == RTL_ATOM_PINNED)
        {
            INT index = PhAddListViewItem(
                ListViewWndHandle,
                MAXINT,
                PhaFormatString(L"%s (Pinned)", atomInfo->Name)->Buffer,
                NULL
                );
            PhSetListViewSubItem(
                ListViewWndHandle,
                index,
                1,
                PhaFormatString(L"%u", atomInfo->UsageCount)->Buffer
                );
        }
        else
        {
            INT index = PhAddListViewItem(
                ListViewWndHandle,
                MAXINT,
                atomInfo->Name,
                NULL
                );
            PhSetListViewSubItem(
                ListViewWndHandle,
                index,
                1,
                PhaFormatString(L"%u", atomInfo->UsageCount)->Buffer
                );
        }

        PhFree(atomInfo);
    }

    PhFree(atomTable);
}
开发者ID:phplugins,项目名称:plugins-extra,代码行数:55,代码来源:main.c

示例2: GetDlgItem

void COutputDialog::UpdateFilterGrid()
{

	CWnd* pList = GetDlgItem(IDC_LIST_FILTER);
	CWnd* pFilterOpt = GetDlgItem(IDC_EDIT_FILTER_OPTION_STRING);
	CWnd* pFilterStatic = GetDlgItem(IDC_STATIC_FILTER_1);
	if(NULL == pList || NULL == pFilterOpt || NULL == pFilterStatic) return;

	// 등록 리스트 가져와서
	ATPLUGIN_ARGUMENT_ARRAY aPluginArgs;
	(MAINAPP)->m_cMultiPlugin.GetPluginArgs(aPluginArgs);

	// 리스트뷰 전체 삭제
	ListView_DeleteAllItems(pList->m_hWnd);

	// 재등록
	TCHAR szBuffer[1024];
	LVITEM lvItem;
	ZeroMemory(&lvItem, sizeof(lvItem));
	lvItem.mask=LVIF_TEXT;
	lvItem.pszText=szBuffer;
	CString strFilterOpt = _T("");
	for(size_t i=0; i< aPluginArgs.size(); i++)
	{
		lvItem.iItem=i;
		lvItem.iSubItem=0;
		lstrcpyn(szBuffer, aPluginArgs[i].strPluginName.c_str(), 1024);
		ListView_InsertItem(pList->m_hWnd, &lvItem);

		lstrcpyn(szBuffer, aPluginArgs[i].strOption.c_str(), 4096);
		ListView_SetItemText(pList->m_hWnd, i, 1, szBuffer);

		if(strFilterOpt.IsEmpty())
		{
			strFilterOpt = CString(_T("/f:")) + aPluginArgs[i].strPluginName.c_str()
						 + _T("{") + aPluginArgs[i].strOption.c_str() + _T("}");
		}
		else
		{
			strFilterOpt += CString(_T(",")) + aPluginArgs[i].strPluginName.c_str()
				+ _T("{") + aPluginArgs[i].strOption.c_str() + _T("}");
		}
	}

	::EnableWindow(pList->m_hWnd, TRUE);

	pFilterOpt->SetWindowText(strFilterOpt);
	BOOL bEnable = strFilterOpt.IsEmpty() ? FALSE : TRUE;
	::EnableWindow(pFilterOpt->m_hWnd, bEnable);
	::EnableWindow(pFilterStatic->m_hWnd, bEnable);		

	OnNMClickListFilter(NULL, NULL);

	return;
}
开发者ID:CodeGenerater,项目名称:araltrans02,代码行数:55,代码来源:OutputDialog.cpp

示例3: TreeList_ResetItem

void TreeList_ResetItem(HWND hwnd, HTREELISTITEM hParent)
{
	TTreeList_Data *data = (TTreeList_Data *)sttTreeList_GeWindowData(hwnd);

	for (int i = hParent->subItems.getCount(); i--;)
		delete hParent->subItems[i];
	hParent->subItems.destroy();

	data->hItemSelected = hParent;
	ListView_DeleteAllItems(hwnd);
}
开发者ID:martok,项目名称:miranda-ng,代码行数:11,代码来源:jabber_treelist.cpp

示例4: ListView_DeleteAllItems

void ListView::resetValues(int codepage)
{
	if (codepage == -1)
		codepage = 0;

	if (_codepage == codepage)
		return;

	ListView_DeleteAllItems(_hSelf);
	setValues(codepage);
}
开发者ID:Arbitel,项目名称:notepad-plus-plus,代码行数:11,代码来源:ListView.cpp

示例5: DeleteAllItems

	// This method deletes all items from the listview
	void DeleteAllItems()
	{
		CItemData *pid;
		
		for (int i = 0; i < _numRows; i++) {
			pid = ItemData(i);
			if (pid)
				delete pid;
		}
		ListView_DeleteAllItems(_hList);
		_numRows = 0;
	}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:13,代码来源:dlg_anniversarylist.cpp

示例6: GetDlgItem

/*
================
rvOpenFileDialog::UpdateFileList

Updates the file list with the files that match the filter in the current
look in directory
================
*/
void rvOpenFileDialog::UpdateFileList ( void )
{
	const char *basepath = mLookin;
	idFileList *files;
	HWND		list = GetDlgItem ( mWnd, IDC_TOOLS_FILELIST );
	int			i;
	int			filter;
		
	ListView_DeleteAllItems ( list );
	
	// Add all the folders first
	files = fileSystem->ListFiles ( basepath, "/", true );
	for ( i = 0; i < files->GetNumFiles(); i ++ )
	{
		if ( files->GetFile( i )[0] == '.' )
		{
			continue;
		}
	
		LVITEM item;
		memset(&item,0,sizeof(item));
		item.mask = LVIF_TEXT;
		item.iItem = ListView_GetItemCount ( list );
		item.pszText = (LPSTR)files->GetFile( i );
		item.iSubItem = 0;
		ListView_InsertItem ( list, &item );
	}
	fileSystem->FreeFileList( files );
	
	// Add all the files in the current lookin directory that match the
	// current filters.
	for ( filter = 0; filter < mFilters.Num(); filter ++ )
	{	
		files = fileSystem->ListFiles( basepath, mFilters[filter], true );
		for ( i = 0; i < files->GetNumFiles(); i ++ )
		{
			if ( files->GetFile( i )[0] == '.' )
			{
				continue;
			}
	
			LVITEM item;
			memset(&item,0,sizeof(item));
			item.mask = LVIF_TEXT|LVIF_IMAGE;
			item.iImage = 2;
			item.iItem = ListView_GetItemCount( list );
			item.pszText = (LPSTR)files->GetFile( i );
			item.iSubItem = 0;
			ListView_InsertItem ( list, &item );
		}
		fileSystem->FreeFileList( files );
	}
}
开发者ID:BielBdeLuna,项目名称:StormEngine2,代码行数:61,代码来源:OpenFileDialog.cpp

示例7: ListView_DeleteAllItems

void AudioGroupFilePresenter::populateGroupColumn(VSTEditor& editor, int collectionIdx, int fileIdx) {
  LVITEM item = {};
  item.mask = LVIF_TEXT;

  ListView_DeleteAllItems(editor.m_groupListView);
  ListView_DeleteAllItems(editor.m_pageListView);
  if (collectionIdx < m_iteratorVec.size()) {
    CollectionIterator& it = m_iteratorVec[collectionIdx];
    if (fileIdx < it->second->m_iteratorVec.size()) {
      size_t idx = 0;
      AudioGroupCollection::GroupIterator& git = it->second->m_iteratorVec[fileIdx];
      for (AudioGroupDataCollection::GroupToken& gtok : git->second->m_groupTokens) {
        wchar_t name[256];
        wnsprintf(name, 256, L"%d (%s)", gtok.m_groupId, gtok.m_song ? L"Song" : L"SFX");
        item.pszText = name;
        item.iItem = idx++;
        ListView_InsertItem(editor.m_groupListView, &item);
      }
    }
  }
}
开发者ID:AxioDL,项目名称:amuse,代码行数:21,代码来源:AudioGroupFilePresenter.cpp

示例8: InitDlgRegfile

//------------------------------------------------------------------------------
void InitDlgRegfile()
{
  SetWindowText(GetDlgItem(h_reg_file,DLG_REG_ED_NTUSER),"");
  SetWindowText(GetDlgItem(h_reg_file,DLG_REG_ED_SAM),"");
  SetWindowText(GetDlgItem(h_reg_file,DLG_REG_ED_SECURITY),"");
  SetWindowText(GetDlgItem(h_reg_file,DLG_REG_ED_SOFTWARE),"");
  SetWindowText(GetDlgItem(h_reg_file,DLG_REG_ED_SYSTEM),"");
  SetWindowText(GetDlgItem(h_reg_file,DLG_REG_ED_OTHER),"");

  TreeView_DeleteAllItems(GetDlgItem(h_reg,TV_VIEW));
  ListView_DeleteAllItems(GetDlgItem(h_reg,LV_VIEW));
}
开发者ID:lukevoliveir,项目名称:omnia-projetcs,代码行数:13,代码来源:tools_registry.c

示例9: StopWatch_Start

void StopWatch_Start(HWND hDlg){
	if(m_start.QuadPart){
		KillTimer(hDlg, 1);
	}
	ListView_DeleteAllItems(GetDlgItem(hDlg,IDC_SW_LAPS));
	QueryPerformanceCounter(&m_start);
	m_lap = m_start;
	m_paused = 0;
	SetTimer(hDlg, 1, 7, NULL);
	SetDlgItemText(hDlg, IDC_SW_START, L"Stop (s)");
	EnableDlgItem(hDlg, IDC_SW_RESET, 1);
}
开发者ID:heicks,项目名称:T-Clock,代码行数:12,代码来源:StopWatch.c

示例10: StopWatch_Reset

void StopWatch_Reset(HWND hDlg){
	if(!m_start.QuadPart)
		return;
	SetDlgItemText(hDlg, IDC_SW_ELAPSED, TIMETEXT_DEFAULT);
	ListView_DeleteAllItems(GetDlgItem(hDlg,IDC_SW_LAPS));
	if(m_paused){ // paused
		m_start.QuadPart=0;
		EnableDlgItemSafeFocus(hDlg,IDC_SW_RESET,0,IDC_SW_START);
	}else{ // running
		QueryPerformanceCounter(&m_start);
		m_lap=m_start;
	}
}
开发者ID:heicks,项目名称:T-Clock,代码行数:13,代码来源:StopWatch.c

示例11: ListView_DeleteAllItems

/*
================
rvGENavigator::Update

Updates the contents of the navigator window from the current workspace
================
*/
void rvGENavigator::Update( void ) {
	// Clear the list first
	ListView_DeleteAllItems( mTree );
	// Add starting with the desktop window
	if( mWorkspace ) {
		AddWindow( mWorkspace->GetInterface( )->GetDesktop( ) );
	}
	// For some reason the horizontal scrollbar wants to show up initially after an update
	// so this forces it not to
	RECT rClient;
	GetClientRect( mTree, &rClient );
	ListView_SetColumnWidth( mTree, 0, rClient.right - rClient.left - 1 );
}
开发者ID:SL987654,项目名称:The-Darkmod-Experimental,代码行数:20,代码来源:GENavigator.cpp

示例12: InitLangList

void InitLangList()
{
	char colTitles[LANG_LINE_SIZE];
	char *catStr;
	char lineStr[LANG_LINE_SIZE];
	short i;
	short category = -1;
	changedSomeStrings = 0;
	alreadySaving = 0;

	// If we have already displayed (created) the list,
	// then week need to delete the column headings... this seems to do it...
	if ( hWndLangBuilderListView )
	{
		ListView_DeleteColumn( hWndLangBuilderListView, EDIT_LANGUAGE_LISTVIEW_POS );
		ListView_DeleteColumn( hWndLangBuilderListView, DEFAULT_ENGLISH_LISTVIEW_POS );
		ListView_DeleteColumn( hWndLangBuilderListView, CATEGORY_NAME_LISTVIEW_POS );
	}
	
	// Initialise the Language list, means creating the column titles and adding them,
	// then making sure there is no data in the list
	mystrncpyNull( colTitles, ReturnString( IDS_LANGBUILDER_LISTTITLES ), LANG_LINE_SIZE );
	mystrncatNull( colTitles, MyPrefStruct.language, LANG_LINE_SIZE );
	hWndLangBuilderListView = InitGenericListView( hDlg, IDC_LANGTOKEN_LIST, 0, 0, colTitles );
	ListView_DeleteAllItems( hWndLangBuilderListView );		

	ListView_SetColumnWidth( hWndLangBuilderListView, CATEGORY_NAME_LISTVIEW_POS, 100 );
	ListView_SetColumnWidth( hWndLangBuilderListView, DEFAULT_ENGLISH_LISTVIEW_POS, 200 );
	ListView_SetColumnWidth( hWndLangBuilderListView, EDIT_LANGUAGE_LISTVIEW_POS, 200 );

	// Add the Language strings to the list
	for ( i = SUMM_BEGIN; i < END_OF_STRINGS; i++ )
	{
		catStr = GetLangSectionName(i);
		if ( !catStr )
			continue;
		mystrncpyNull( lineStr, catStr, LANG_LINE_SIZE ); 
		mystrncatNull( lineStr, LANG_LIST_SEP, LANG_LINE_SIZE ); 
		mystrncatNull( lineStr, DefaultEnglishStr(i), LANG_LINE_SIZE ); 
		mystrncatNull( lineStr, LANG_LIST_SEP, LANG_LINE_SIZE ); 
		mystrncatNull( lineStr, TranslateID(i), LANG_LINE_SIZE ); 
		AddItemToListView( hWndLangBuilderListView, ListView_GetItemCount(hWndLangBuilderListView), 3, lineStr, LANG_LIST_SEP );
	}
	ListView_GetItemText( hWndLangBuilderListView, 0, EDIT_LANGUAGE_LISTVIEW_POS, lineStr, LANG_LINE_SIZE );
	SetWindowText( GetDlgItem( hDlg, IDC_LANGTOKEN_TEXT), lineStr );
	SetFocus( GetDlgItem( hDlg, IDC_LANGTOKEN_LIST ) );
	int state = LVIS_SELECTED|LVIS_FOCUSED;
	if ( hWndLangBuilderListView )
		ListView_SetItemState( hWndLangBuilderListView, 0, state, state );
}
开发者ID:rauls,项目名称:iReporter,代码行数:50,代码来源:LangBuilderGUI.cpp

示例13: SongListClear

void SongListClear()
{
	PLAYERINFO* next = first;
	while (next != NULL)
	{
		PLAYERINFO* current = next;
		next = next->next;
		PlayInfoRelease(current, TRUE);
	}
		
	ListView_DeleteAllItems(songlist.hWnd);
	first = NULL;
	last = NULL;
}
开发者ID:hihua,项目名称:hihuacode,代码行数:14,代码来源:SongList.cpp

示例14: EnableMenuItem

bool NGMainWnd::onnet_disconnect(void) {
	EnableMenuItem(GetSubMenu(this->hmenu, 0), IDM_CONNECT, MF_BYCOMMAND | MF_ENABLED);
	EnableMenuItem(GetSubMenu(this->hmenu, 0), IDM_DISCONNECT, MF_BYCOMMAND | MF_GRAYED);
	EnableMenuItem(this->hmenu, 1, MF_BYPOSITION | MF_GRAYED);
	EnableMenuItem(this->hmenu, 2, MF_BYPOSITION | MF_GRAYED);
	DrawMenuBar(this->hwnd);

	ListView_DeleteAllItems(this->hplwnd);
	ListView_DeleteAllItems(this->hfilewnd);
	TreeView_DeleteAllItems(this->hbrowsewnd);

	this->playlist.clear();
	this->playlist_pos = -1;
	this->playlist_size = 0;
	this->browsenodes.clear();
	this->browseindex = -1;
	if (this->dragndrop != NULL) {
		delete this->dragndrop;
		this->dragndrop = NULL;
	}
	this->toolbox_select(TOOLBOX_CONNECT);
	return true;
}
开发者ID:nitrotm,项目名称:ngwinamp2,代码行数:23,代码来源:mainwnd_netevents.cpp

示例15: DhcpRefresh_ListView

// -------------------------------------
// ListView management
// --------------------------------------
void DhcpRefresh_ListView ( int nbLeases, struct S_Lease tLeases[] )
{
struct tm ltime;
int Ark;
char szDate[64];
LVITEM LvItem;
int itemPos;
HWND hListV;
HWND hWnd = hDbgMainWnd;

    memset (&LvItem, 0, sizeof LvItem);

   while (GetParent (hWnd)!=NULL)  hWnd=GetParent(hWnd);
   hListV = GetDlgItem (hWnd, IDC_LV_DHCP);
   
   ListView_DeleteAllItems (hListV);
   for (Ark = 0 ;   Ark < nbLeases  ;  Ark++ )
   {
  	  LvItem.mask = LVIF_PARAM | LVIF_STATE;
      LvItem.state = 0;
      LvItem.stateMask = 0;
      LvItem.iItem = Ark;      // numéro de l'item
      LvItem.iSubItem = 0;     // index dans la ligne
      LvItem.lParam = inet_addr (tLeases[Ark].szIP);  // keep track of assignation
	  itemPos = ListView_InsertItem(hListV,(LPARAM)&LvItem);

#ifdef _MSC_VER
            localtime_s (&ltime, & tLeases[Ark].tAllocated);
#else
            memcpy (& ltime, localtime (& tLeases[Ark].tAllocated), sizeof ltime);
#endif
	wsprintf (szDate, "%02d/%02d %02d:%02d:%02d", 
					  ltime.tm_mon+1, ltime.tm_mday,ltime.tm_hour, ltime.tm_min, ltime.tm_sec);	
	ListView_SetItemText (hListV, itemPos, 0, szDate);
	ListView_SetItemText (hListV, itemPos, 1, tLeases[Ark].szIP);
	ListView_SetItemText (hListV, itemPos, 2, tLeases[Ark].szMAC);
	
	if (tLeases[Ark].tRenewed != 0)
	{
#ifdef _MSC_VER
            localtime_s (&ltime, & tLeases[Ark].tRenewed);
#else
            memcpy (& ltime, localtime (& tLeases[Ark].tRenewed), sizeof ltime);
#endif
	     wsprintf (szDate, "%02d/%02d %02d:%02d:%02d", 
					  ltime.tm_mon+1, ltime.tm_mday,ltime.tm_hour, ltime.tm_min, ltime.tm_sec);	
	     ListView_SetItemText (hListV, itemPos, 3, szDate);
	 }	// renew ! =0	   
   } // parse all alocations
} // DhcpRefresh_ListView 
开发者ID:julchar,项目名称:tftpd-64,代码行数:53,代码来源:gui_bootpd.c


注:本文中的ListView_DeleteAllItems函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。