本文整理汇总了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]);
}
}
示例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;
}
}
示例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;
}
示例4: OnLibdel
void CProjectView::OnLibdel()
{
int nItem;
CListBox* pLB = (CListBox*)GetDlgItem(IDP_LIBLIST);
nItem = pLB->GetCurSel();
pLB->DeleteString(nItem);
}
示例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;
}
示例6: _UnloadScene
void xTerrainVegDlg::_UnloadScene(Event * sender)
{
CListBox * list = (CListBox *)GetDlgItem(IDC_TV_List);
while (list->GetCount())
list->DeleteString(0);
MForest::Instance()->RemoveAllVegetationBlock();
}
示例7: OnRemoveTotem
void CSpellBaseParmDlg::OnRemoveTotem()
{
CListBox *pList;
pList = (CListBox *)GetDlgItem(IDC_REQUIRESTOTEM);
int nCurSel = pList->GetCurSel();
if (nCurSel != LB_ERR)
pList->DeleteString(nCurSel);
}
示例8: OnDeleteButton
void CDizzyDialog::OnDeleteButton()
{
UpdateData(true);
CListBox* pListBox = (CListBox*) GetDlgItem(IDC_INPUT_LIST);
if (pListBox->DeleteString(pListBox->GetCurSel()) != LB_ERR)
{
RecalculateRotation();
}
UpdateData(false);
}
示例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 );
}
}
}
示例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);
}
}
示例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());
}
}
示例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 );
}
}
}
}
示例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]);
}
}
}
示例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 );
}
}
}
}
示例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--;
}
}
}