本文整理汇总了C++中CStrList::GetText方法的典型用法代码示例。如果您正苦于以下问题:C++ CStrList::GetText方法的具体用法?C++ CStrList::GetText怎么用?C++ CStrList::GetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStrList
的用法示例。
在下文中一共展示了CStrList::GetText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnInitDialog
BOOL CIndexOfPropPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// Init the text of m_TextEdit
CStrList StrList;
StrList.Add(TEXT("abc"));
StrList.Add(TEXT("123,4"));
StrList.Add(TEXT("x y z"));
StrList.Add(TEXT("a=b"));
StrList.Add(TEXT("a=c"));
StrList.Add(TEXT("b=test1"));
StrList.Add(TEXT("str = test2"));
StrList.Add(TEXT("str=test2"));
StrList.Add(TEXT("string=test3"));
m_TextEdit.SetWindowText(StrList.GetText());
// Init m_IndexOfParamEdit
m_IndexOfParamEdit.SetWindowText(TEXT("a=c"));
// Init m_IndexOfNameParamEdit
m_IndexOfNameParamEdit.SetWindowText(TEXT("str"));
return TRUE;
}
示例2: OnBnClickedButtonLoad
void CLoadSavePropPage::OnBnClickedButtonLoad()
{
const int MAX_BUFFER_SIZE = 1024;
CFileDialog FileDialog(TRUE);
CString strBuffer;
FileDialog.GetOFN().lpstrFile = strBuffer.GetBuffer(MAX_BUFFER_SIZE);
FileDialog.GetOFN().nMaxFile = MAX_BUFFER_SIZE;
FileDialog.GetOFN().lpstrDefExt = TEXT(".txt");
FileDialog.GetOFN().lpstrFilter = TEXT("Text Files(*.txt)\0*.txt\0All Files(*.*)\0*.*\0\0");
FileDialog.GetOFN().Flags |= OFN_FILEMUSTEXIST;
INT_PTR nRet = FileDialog.DoModal();
strBuffer.ReleaseBuffer();
if (nRet == IDOK)
{
CString strFileName = FileDialog.GetPathName();
CStrList StrList;
StrList.LoadFromFile(strFileName, false);
m_TextEdit.SetWindowText(StrList.GetText());
}
}
示例3: OnBnClickedButtonSetCommatext
void CCommaTextPropPage::OnBnClickedButtonSetCommatext()
{
CStrList StrList;
CString strCommaText;
m_CommaTextEdit.GetWindowText(strCommaText);
StrList.SetCommaText(strCommaText);
m_Edit2.SetWindowText(StrList.GetText());
}
示例4: OnBnClickedButtonSort
void CSortPropPage::OnBnClickedButtonSort()
{
CString strText;
m_TextEdit.GetWindowText(strText);
CStrList StrList;
StrList.SetText(strText);
StrList.SetSorted(true);
m_TextEdit.SetWindowText(StrList.GetText());
}