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


C++ CListBox::DeleteString方法代码示例

本文整理汇总了C++中CListBox::DeleteString方法的典型用法代码示例。如果您正苦于以下问题:C++ CListBox::DeleteString方法的具体用法?C++ CListBox::DeleteString怎么用?C++ CListBox::DeleteString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CListBox的用法示例。


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

示例1: removeSelected

void CChangeOrderDlg::removeSelected(const CompactIntArray &selected) {
  CListBox *lb = getListBox();
  for(intptr_t i = selected.size() - 1; i >= 0; i--) {
    m_editList.removeIndex(selected[i]);
    lb->DeleteString(selected[i]);
  }
}
开发者ID:JesperMikkelsen,项目名称:Big-Numbers,代码行数:7,代码来源:ChangeOrderDlg.cpp

示例2: OnFloderChanged

void xSceneOpenDlg::OnFloderChanged()
{
    CListBox * listFloder = (CListBox *)GetDlgItem(IDC_SceneOpen_Floder);
    CListBox * listScene = (CListBox *)GetDlgItem(IDC_SceneOpen_Scene);

    while (listScene->GetCount())
        listScene->DeleteString(0);

    int isel = listFloder->GetCurSel();

    if (isel < 0)
        return ;

    CString strFloder;

    listFloder->GetText(isel, strFloder);

    ResourceGroup * rg = ResourceManager::Instance()->GetResourceGroup();

    Archive * ar = rg->GetArchive((LPCTSTR)strFloder);

    Archive::FileInfoVisitor v = ar->GetFileInfos();

    while (!v.eof())
    {
        const TString128 & filename = v.Cursor()->second.name;

        if (File::GetExternName(filename) == "scene")
        {
            listScene->AddString(filename.c_str());
        }

        ++v;
    }
}
开发者ID:ak4hige,项目名称:myway3d,代码行数:35,代码来源:xSceneOpenDlg.cpp

示例3: OnDeltaposSpinModify

void SettingsDlg::OnDeltaposSpinModify(NMHDR *pNMHDR, LRESULT *pResult)
{
	LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR);
	CListBox *listbox;
	CListBox *listbox2;
	listbox = (CListBox*)GetDlgItem(IDC_AUDIO_CODECS_ALL);
	listbox2 = (CListBox*)GetDlgItem(IDC_AUDIO_CODECS);
	if (pNMUpDown->iDelta == -1) {
		//add
		int selected = listbox->GetCurSel();
		if (selected != LB_ERR) 
		{
			CString str;
			listbox->GetText(selected, str);
			listbox2->AddString(str);
			listbox->DeleteString(selected);
			listbox->SetCurSel( selected < listbox->GetCount() ? selected : selected-1 );
		}
	} else {
		//remove
		int selected = listbox2->GetCurSel();
		if (selected != LB_ERR) 
		{
			CString str;
			listbox2->GetText(selected, str);
			listbox->AddString(str);
			listbox2->DeleteString(selected);
			listbox2->SetCurSel( selected < listbox2->GetCount() ? selected : selected-1 );
		}
	}
	*pResult = 0;
}
开发者ID:tech-thinking,项目名称:Ksip,代码行数:32,代码来源:SettingsDlg.cpp

示例4: OnLibdel

void CProjectView::OnLibdel() 
{
   int nItem;
   CListBox* pLB = (CListBox*)GetDlgItem(IDP_LIBLIST);
   nItem = pLB->GetCurSel();
   pLB->DeleteString(nItem);
}
开发者ID:AmziLS,项目名称:apls,代码行数:7,代码来源:project.cpp

示例5: OnClientConnect

//客户端连接断开消息函数
LONG CTCPServerDlg::OnClientConnect(WPARAM wParam,LPARAM lParam)
{
	int iIndex;
	TCHAR *szAddress = (TCHAR*)lParam;
	CString strAddrss = szAddress;
	
	CListBox * pLstConn = (CListBox*)GetDlgItem(IDC_LST_CONN);
	ASSERT(pLstConn != NULL);

	if (wParam == 0)
	{
		pLstConn->AddString(strAddrss + _T("建立连接"));
	}
	else
	{
		iIndex = pLstConn->FindString(iIndex,strAddrss + _T("建立连接"));
		if (iIndex != LB_ERR)
		{
			pLstConn->DeleteString(iIndex); 
		}
	}

	//释放内存
	delete[] szAddress;
	szAddress = NULL;
	return 0;
}
开发者ID:isongbo,项目名称:MyCode,代码行数:28,代码来源:TCPServerDlg.cpp

示例6: _UnloadScene

void xTerrainVegDlg::_UnloadScene(Event * sender)
{
	CListBox * list = (CListBox *)GetDlgItem(IDC_TV_List);

	while (list->GetCount())
		list->DeleteString(0);

	MForest::Instance()->RemoveAllVegetationBlock();
}
开发者ID:ak4hige,项目名称:myway3d,代码行数:9,代码来源:xTerrainVegDlg.cpp

示例7: OnRemoveTotem

void CSpellBaseParmDlg::OnRemoveTotem() 
{
	CListBox *pList;
	pList = (CListBox *)GetDlgItem(IDC_REQUIRESTOTEM);

	int nCurSel = pList->GetCurSel();
	if (nCurSel != LB_ERR)

	pList->DeleteString(nCurSel);
}
开发者ID:Joincheng,项目名称:lithtech,代码行数:10,代码来源:SpellBaseParmDlg.cpp

示例8: OnDeleteButton

void CDizzyDialog::OnDeleteButton() 
{
	UpdateData(true);
	CListBox* pListBox = (CListBox*) GetDlgItem(IDC_INPUT_LIST);
	if (pListBox->DeleteString(pListBox->GetCurSel()) != LB_ERR) 
	{
		RecalculateRotation();
	}	
	UpdateData(false);
}
开发者ID:Floppy,项目名称:Vapour,代码行数:10,代码来源:DizzyDialog.cpp

示例9: OnRemoveButtonClicked

void CSelectDialog::OnRemoveButtonClicked() {
	CListBox* fieldList = (CListBox*)GetDlgItem( IDC_FIELDLIST );
	CListBox* chosenList = (CListBox*)GetDlgItem( IDC_CHOSENLIST );
	for ( int i=chosenList->GetCount()-1; i>=0; i-- ) {
		if ( chosenList->GetSel( i ) ) {
			CString temp;
			chosenList->GetText( i, temp );
			fieldList->AddString( temp );
			chosenList->DeleteString( i );
		}
	}
}
开发者ID:bklimt,项目名称:QueryWizard,代码行数:12,代码来源:SelectDialog.cpp

示例10: OnBnClickedServerFinish

void CNewsHubDlg::OnBnClickedServerFinish()
{
  CListBox* pRunningServers = (CListBox*)GetDlgItem(IDC_RUNNING_SERVERS);
  
  int row = pRunningServers->GetCurSel();
  if (row != LB_ERR)
  {
    ServerLoop* serverLoop = (ServerLoop*)pRunningServers->GetItemDataPtr(row);
    delete serverLoop;
    pRunningServers->DeleteString(row);
  }
}
开发者ID:rushad,项目名称:newshub,代码行数:12,代码来源:newshubuiDlg.cpp

示例11: _refrushList

void xTerrainVegDlg::_refrushList()
{
	CListBox * list = (CListBox *)GetDlgItem(IDC_TV_List);

	while (list->GetCount())
		list->DeleteString(0);

	for (int i = 0; i < MForest::Instance()->GetVegetationCount(); ++i)
	{
		MVegetation * veg = MForest::Instance()->GetVegetation(i);

		list->InsertString(i, veg->Name.c_str());
	}
}
开发者ID:ak4hige,项目名称:myway3d,代码行数:14,代码来源:xTerrainVegDlg.cpp

示例12: OnDownButtonClicked

void CSelectDialog::OnDownButtonClicked() {
	CListBox* chosenList = (CListBox*)GetDlgItem( IDC_CHOSENLIST );
	for ( int i=chosenList->GetCount()-2; i>=0; i-- ) {
		if ( chosenList->GetSel( i ) ) {
			if ( !chosenList->GetSel( i+1 ) ) {
				char temp[4000];
				chosenList->GetText( i+1, temp );
				chosenList->InsertString( i, temp );
				chosenList->SetSel( i+2, TRUE );
				chosenList->DeleteString( i+2 );
			}
		}
	}
}
开发者ID:bklimt,项目名称:QueryWizard,代码行数:14,代码来源:SelectDialog.cpp

示例13: BuildAndRemoveSelected

void CGroupAddDialog::BuildAndRemoveSelected(CListBox& lb, std::vector<std::string>& str)
{
	str.clear();

	int	selcnt = lb.GetSelCount();
	if (selcnt) {
		int	*sels = new int[selcnt];
		lb.GetSelItems(selcnt, sels);
		for(int x=selcnt -1; x >= 0; --x) {
			str.push_back(lb.GetText(sels[x]));
			lb.DeleteString(sels[x]);
		}
	}
}
开发者ID:KingLebron,项目名称:safmq,代码行数:14,代码来源:GroupAddDialog.cpp

示例14: OnUpButtonClicked

void CSelectDialog::OnUpButtonClicked() {
	CListBox* chosenList = (CListBox*)GetDlgItem( IDC_CHOSENLIST );
	for ( int i=1; i<chosenList->GetCount(); i++ ) {
		if ( chosenList->GetSel( i ) ) {
			char temp[4000];
			if ( !chosenList->GetSel( i-1 ) ) {
				chosenList->GetText( i, temp );
				chosenList->InsertString( i-1, temp );
				chosenList->SetSel( i-1, TRUE );
				chosenList->DeleteString( i+1 );
			}
		}
	}
}
开发者ID:bklimt,项目名称:QueryWizard,代码行数:14,代码来源:SelectDialog.cpp

示例15: OnButtonRemove

void CSaveMovieDialog::OnButtonRemove()
{
	CListBox * pListBox = (CListBox *)GetDlgItem(IDC_LIST_BITMAP_FILENAME);

	for (int i=0;i < pListBox->GetCount();i++)
	{
		if ( pListBox->GetSel(i) > 0 )
		{	
			//    selected.
			pListBox->DeleteString(i);
			i--;
		}
	}
}
开发者ID:AnthonyNystrom,项目名称:GenXSource,代码行数:14,代码来源:SaveMovieDialog.cpp


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