C++ CListBox::ResetContent方法代码示例(c++clistbox::resetcontent方法的典型用法代码示例)

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


C++ CListBox::ResetContent方法代码示例(c++clistbox::resetcontent方法的典型用法代码示例)

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

示例1: fillSuggestionsList

// fillSuggestionsList:
// Fill the suggestions list with suggestions for the current word.
void CSpellingDlg::fillSuggestionsList() {
	CWaitCursor busy;

	SSCE_CHAR problemWord[SSCE_MAX_WORD_SZ];
	GetDlgItemText(IDC_PROBLEMWORD, (TCHAR *)problemWord, sizeof(problemWord));

	const int maxSuggestions = 16;
	SSCE_CHAR suggestions[maxSuggestions * SSCE_MAX_WORD_SZ];
	SSCE_S16 scores[maxSuggestions];
    SSCE_Suggest(SSCE_GetSid(), problemWord, suggestionDepth,
      suggestions, sizeof(suggestions), scores, maxSuggestions);

	CListBox *suggestionsList = (CListBox *)GetDlgItem(IDC_SUGGESTIONSLIST);
	suggestionsList->ResetContent();
    for (const SSCE_CHAR *p = suggestions; *p != _T('\0');
	  p += lstrlen((TCHAR *)p) + 1) {
		suggestionsList->AddString((TCHAR *)p);
	}

    // Select the first suggestion and copy it to the Change To field.
    if (suggestionsList->GetCount() > 0) {
		suggestionsList->SetSel(0);
		CString word1;
		suggestionsList->GetText(0, word1);
		SetDlgItemText(IDC_CHANGETO, word1);
    }
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:29,代码来源:SpellingDlg.cpp

示例2: switch

void KG3DAnimationContainer::FillAnimationList(CListBox& ListBox, enuFillListBoxType Type)
{
    ListBox.ResetContent();
    LPCTSTR pszName = NULL;
    for(int i = 0; i < static_cast<int>(m_Clips.size()); i++)
    {

        switch(Type)
        {
        case ENUM_FILL_WITH_ANINAME:
        {
            m_Clips[i]->GetName(&pszName);
            ListBox.InsertString(i, pszName);
            ListBox.SetItemData(i, reinterpret_cast<DWORD_PTR>(m_Clips[i]));
            break;
        }
        case ENUM_FILL_WITH_FILENAME:
        {
            m_Clips[i]->GetPathName(&pszName);
            ListBox.InsertString(i, pszName);
            ListBox.SetItemData(i, reinterpret_cast<DWORD_PTR>(m_Clips[i]));
            break;
        }
        }
    }
}
开发者ID:viticm,项目名称:pap2,代码行数:26,代码来源:KG3DAnimationContainer.cpp

示例3: BuildSearchList

void CDlgReplaceBox::BuildSearchList()
{
	// Build the list box
	CListBox* theListBox = (CListBox*) GetDlgItem( FINDGET_LIST );
	theListBox->ResetContent();

	// Ensure the string is in Lower case for searching
	m_search_string.MakeLower();

	CLibraryCollection::FillMatchingSymbols( theListBox, m_search_string, NULL );

	// Try and find the selected symbol in the list
	int i;
	for (i = 0; i < theListBox->GetCount(); i++)
	{
		if (theListBox->GetItemDataPtr( i ) == m_Symbol)
		{
			theListBox->SetCurSel( i );
			break;
		}
	}
	if (i == theListBox->GetCount())
	{
		m_Symbol = NULL;
		GetDlgItem( IDC_SHOW_SYMBOL )->RedrawWindow();
	}
}
开发者ID:saranyan,项目名称:tinycad_graph_matching,代码行数:27,代码来源:DlgReplaceBox.cpp

示例4: OnClearButton

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

示例5: OnEditRandom

void CChangeOrderDlg::OnEditRandom() {
  m_editList.shuffle();
  CListBox *lb = getListBox();
  lb->ResetContent();
  for(size_t i = 0; i < m_editList.size(); i++) {
    insertMediaFileIntoListBox(i,m_editList[i]);
  }
  lb->InsertString((int)m_mediaQueue.size(),EMPTYSTRING);
}
开发者ID:JesperMikkelsen,项目名称:Big-Numbers,代码行数:9,代码来源:ChangeOrderDlg.cpp

示例6: RefreshUserList

void CUserListDlg::RefreshUserList() {
	vector<string> userList = storage.GetUserList();
	CListBox* userListBox = (CListBox*)GetDlgItem( IDC_USERLIST );
	if ( userListBox ) {
		userListBox->ResetContent();
		for ( int i=0; i<userList.size(); i++ ) {
			userListBox->AddString( userList[i].c_str() );
		}
	}
}
开发者ID:bklimt,项目名称:StudentInfo,代码行数:10,代码来源:UserListDlg.cpp

示例7: OnBnClickedBtnClose

//关闭
void CTCPServerDlg::OnBnClickedBtnClose()
{
	CListBox * pLstConn = (CListBox*)GetDlgItem(IDC_LST_CONN);
	ASSERT(pLstConn != NULL);
	
	CListBox * pLstRecv = (CListBox*)GetDlgItem(IDC_LST_RECV);
	ASSERT(pLstRecv != NULL);
	
	//
	if (m_tcpServer.Close() <=0)
	{
		AfxMessageBox(_T("关闭TCP服务器失败"));
		return;
	}
	
	//清空列表
	pLstConn->ResetContent();
	pLstRecv->ResetContent();
}
开发者ID:isongbo,项目名称:MyCode,代码行数:20,代码来源:TCPServerDlg.cpp

示例8: BuildList

void CLabelTypeDialog::BuildList(void)
{
	int nType = IsDlgButtonChecked(IDC_LABEL_TYPE_LASER)
						? CPaperInfo::PAPER_CutSheet
						: CPaperInfo::PAPER_Continuous;

	/*
	// Get the name to match.
	*/

	CString csOldName;
	if (m_pOldInfo != NULL)
	{
		csOldName = m_pOldInfo->GetName();
	}

	int nNewSel = 0;
	CListBox* pList;

	if ((pList = (CListBox*)GetDlgItem(IDC_LABEL_LIST)) != NULL)
	{
		pList->SetRedraw(FALSE);
		pList->ResetContent();
		int nLabels = m_List.Labels();
		for (int nLabel = 0; nLabel < nLabels; nLabel++)
		{
			CLabelData* pLabel = m_List.Label(nLabel);
			ASSERT(pLabel != NULL);
			if (pLabel != NULL && pLabel->Type() == nType)
			{
				int nIndex = pList->AddString(pLabel->GetName());
				if (nIndex >= 0)
				{
					pList->SetItemData(nIndex, (DWORD)pLabel);

					if (pLabel->GetName() == csOldName)
					{
						nNewSel = nIndex;
					}
				}
			}
		}

	/*
	// Set the initial entry as necessary.
	*/

		if (pList->GetCount() > 0)
		{
			pList->SetCurSel(nNewSel);
			OnSelchangeLabelList();
		}
		pList->SetRedraw(TRUE);
	}
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:55,代码来源:LABELDLG.CPP

示例9: setGroupListBoxValues

static void setGroupListBoxValues(CListBox &GroupListBox, const CGroupList &GroupList) {
	GroupListBox.ResetContent();
	CGroupList::EConstIterator it;
	for (it = GroupList.Begin(); !it.IsDone(); it++) {
		CString tmpCStr;
		tmpCStr = _TEXT("[");
		tmpCStr += ((*it).m_Label);
		tmpCStr += _TEXT("] ");
		GroupListBox.AddString(tmpCStr);
	}
}
开发者ID:Echelon9,项目名称:mechcommander2-open,代码行数:11,代码来源:CampaignDialog.cpp

示例10:

void CQuoteTesterDlg::OnBnClickedButton8()
{
	// TODO: Add your control notification handler code here
	CListBox   *pListBox   =   (CListBox *)GetDlgItem(IDC_LIST); 
	pListBox->ResetContent();

	CComboBox   *pComboBox   =   (CComboBox *)GetDlgItem(IDC_COMBO_KLine); 
	int nType = pComboBox->GetCurSel();

	m_nType = 4;
}
开发者ID:weini2,项目名称:Capital,代码行数:11,代码来源:QuoteTesterDlg.cpp

示例11:

void CBerkeleyView::OnBnClickedButton1()
{
	CString csDbFile;
	GetDlgItem(IDC_DB_FILE)->GetWindowTextW(csDbFile);

	if (!csDbFile.IsEmpty())
	{
		if (m_spDb.get() != NULL)
		{
			m_spDb->DestroyDb();
		}

		m_spDb.reset(new CDbLayer_Test());
		m_spDb->InitDb(csDbFile);

		CComboBox* pBox = (CComboBox*)GetDlgItem(IDC_DATA_TYPE);
		m_spDb->SetDecoder((DataDecoder::DataEncodeType)pBox->GetItemData(pBox->GetCurSel()));

		CListBox* pList = (CListBox*)GetDlgItem(IDC_LIST_DB_CONTENT);
		pList->ResetContent();

		std::vector<tstring> data = m_spDb->GetFirstData();
		if (data.size() > 0)
		{
			tstring line = _T("1 ");
			for(int i = 0; i < data.size(); ++i)
			{
				line.append(data[i].size() > 50 ? data[i].substr(0, 50) + _T("...") : data[i]);
				line.append(_T(" "));
			}

			pList->AddString(line.c_str());
		}

		int nLine = 1;
		data = m_spDb->GetNextData();
		while(nLine < 1000 && data.size() > 0)
		{
			CString csNum;
			csNum.Format(_T("%d "), nLine+1);
			tstring line = csNum;
			for(int i = 0; i < data.size(); ++i)
			{
				line.append(data[i].size() > 50 ? data[i].substr(0, 50) + _T("...") : data[i]);
				line.append(_T(" "));
			}

			pList->AddString(line.c_str());
			data = m_spDb->GetNextData();
			++nLine;
		}
	}
}
开发者ID:VinceZK,项目名称:LRCS_WIN,代码行数:53,代码来源:BerkeleyView.cpp

示例12: OnBnClickedRefreshImageList

void CSystemTestDlg::OnBnClickedRefreshImageList()
{
	CFileFind finder;
	CListBox* list = (CListBox*)GetDlgItem(IDC_IMAGE_LIST);
	list->ResetContent();
	BOOL bWorking = finder.FindFile(TEXT("img\\screenshot\\*.bmp"));
	while(bWorking) {
		bWorking = finder.FindNextFile();
		list->AddString(finder.GetFileName());
	}
	_out(TEXT("Refresh done."));
}
开发者ID:donilan,项目名称:study,代码行数:12,代码来源:SystemTestDlg.cpp

示例13: OnBnClickedRefreshMatchList

void CSystemTestDlg::OnBnClickedRefreshMatchList()
{
	CFileFind finder;
	CListBox* list = (CListBox*)GetDlgItem(IDC_MATCH_LIST);
	list->ResetContent();
	BOOL bWorking = finder.FindFile(TEXT("img\\match\\*.bmp"));
	while(bWorking) {
		bWorking = finder.FindNextFile();
		list->AddString(finder.GetFileName());
	}
	_out(TEXT("Refresh Match list done."));
}
开发者ID:donilan,项目名称:study,代码行数:12,代码来源:SystemTestDlg.cpp

示例14: PopulatePCJList

void CModelPropPage::PopulatePCJList(void)
{
	CListBox *pListBox = (CListBox *) GetDlgItem(IDC_LIST_PCJ);
	if (pListBox)
	{
		pListBox->ResetContent();

		for (int i = 0; i<m_PCJList.size(); i++)
		{
			pListBox->InsertString(-1, (LPCSTR) m_PCJList[i]);
		}
	}
}
开发者ID:DT85,项目名称:Assimilate,代码行数:13,代码来源:Model.cpp

示例15: BuildList

void CPhotoProjectsTypeDlg::BuildList(void)
{
	/*
	// Get the name to match.
	*/

	CString csOldName;
	if (m_pOldInfo != NULL)
	{
		csOldName = m_pOldInfo->GetName();
	}

	int nNewSel = 0;
	CListBox* pList;

	if ((pList = (CListBox*)GetDlgItem(IDC_PHOTOPROJECTS_LIST)) != NULL)
	{
		pList->SetRedraw(FALSE);
		pList->ResetContent();
		int nPhotoPrjs = m_List.PhotoProjects();
		for (int nPhotoPrj = 0; nPhotoPrj < nPhotoPrjs; nPhotoPrj++)
		{
			CPhotoPrjData* pPhotoPrj = (CPhotoPrjData*)m_List.PhotoProject(nPhotoPrj);
			ASSERT(pPhotoPrj != NULL);

			int nIndex = pList->AddString(pPhotoPrj->m_pSubAreaData[0]->GetName());
			if (nIndex >= 0)
			{
				pList->SetItemData(nIndex, (DWORD)pPhotoPrj);

				if (pPhotoPrj->m_pSubAreaData[0]->GetName() == csOldName)
				{
					nNewSel = nIndex;
				}
			}
		}

	/*
	// Set the initial entry as necessary.
	*/

		if (pList->GetCount() > 0)
		{
			pList->SetCurSel(nNewSel);
			OnSelchangePhotoProjectsList();
		}
		pList->SetRedraw(TRUE);
	}


}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:51,代码来源:PhPrjDlg.cpp

本文标签属性:

示例:示例的拼音

代码:代码是什么

CListBox:listbox

ResetContent:ResetContent

上一篇:追凶者也什么意思?(追凶者也是什么)(《疯狂的石头》追凶者也是什么意思,宋老二的3个真实故事)
下一篇:Java PreferenceManager.remove方法代码示例

为您推荐