本文整理汇总了C++中CStrList::SaveToFile方法的典型用法代码示例。如果您正苦于以下问题:C++ CStrList::SaveToFile方法的具体用法?C++ CStrList::SaveToFile怎么用?C++ CStrList::SaveToFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStrList
的用法示例。
在下文中一共展示了CStrList::SaveToFile方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnOK
// ================================================
void resultfm::OnOK()
// ================================================
{
char buf[1000];
char tabs[1000];
int i;
if (!TestConsistency())
return;
m_edit_format.GetWindowText(buf,999);
for (i=0;i<(int)strlen(buf);i++)
if (!strchr(" ASETIDKXY",buf[i]))
ERR_MSG2_RET("E_ILLRCCIS",buf[i]);
m_edit_tabs.GetWindowText(tabs,999);
for (i=0;i<(int)strlen(tabs);i++)
if (tabs[i]!=',' && !isdigit(tabs[i]))
ERR_MSG2_RET("E_ILLRSCCIS",tabs[i]);
resultdisp.RemoveAll();
resultdisp.AddTail(buf);
resultdisp.AddTail(tabs);
resultdisp.SaveToFile("resudisp.cfg");
KillTimer(2345);
CDialog::OnOK();
}
示例2: OnBnClickedButtonSave
void CLoadSavePropPage::OnBnClickedButtonSave()
{
const int MAX_BUFFER_SIZE = 1024;
CFileDialog FileDialog(FALSE);
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");
INT_PTR nRet = FileDialog.DoModal();
strBuffer.ReleaseBuffer();
if (nRet == IDOK)
{
CString strFileName = FileDialog.GetPathName();
CString strText;
m_TextEdit.GetWindowText(strText);
CStrList StrList;
StrList.SetText(strText);
StrList.SaveToFile(strFileName, false);
}
}
示例3: OnOK
// ========================================================================
void cfg_ring::OnOK()
// ========================================================================
{
int from=0,to=0;
UpdateData(1);
if (m_nr_m1.IsEmpty() || m_pause_m1.IsEmpty() || m_nr_m2.IsEmpty() ||
m_pause_m2.IsEmpty() || m_nr_isdn.IsEmpty() || m_pause_isdn.IsEmpty())
ERR_MSG_RET("E_PFUAE");
sscanf(m_from,"%d",&from);
sscanf(m_to,"%d",&to);
if (m_for1 || m_for2)
{
if (from<1) ERR_MSG_RET("E_WFSPCA");
if (to<1 || to<from) ERR_MSG_RET("E_WFSPCA");
}
set_cfg(CFG_INCOMIN,"Modem1",m_nr_m1+","+m_pause_m1);
set_cfg(CFG_INCOMIN,"Modem2",m_nr_m2+","+m_pause_m2);
set_cfg(CFG_INCOMIN,"ISDN",m_nr_isdn+","+m_pause_isdn);
income_times.defaultindex=m_disable.GetCheck();
income_times.reserved3=0;
if (m_for1) income_times.reserved3 |=1;
if (m_for2) income_times.reserved3 |=2;
income_times.reserved4=from;
income_times.reserved5=to;
income_times.SaveToFile("incomet.cfg");
gIncomeDevicesHaveChanged=1;
if(m_bCloseOnOk)
CDialog::OnOK();
}
示例4: OnOK
// ===========================================================================
void receiver::OnOK()
// ===========================================================================
{
Agroups.SaveToFile("receiver.cfg");
if(m_bCloseOnOk)
CDialog::OnOK();
}
示例5: OnDefault
// ================================================
void resultfm::OnDefault()
// ================================================
{
m_edit_format.SetWindowText("ATSTI");
m_edit_tabs.SetWindowText("72,154");
resultdisp.RemoveAll();
resultdisp.AddTail("ATSTI");
resultdisp.AddTail("72,154");
resultdisp.SaveToFile("resudisp.cfg");
}
示例6: OnOK
// =================================================================
void cfgexfr::OnOK()
// =================================================================
{
CString str;
m_edit_path.GetWindowText(str);
if (strchr(str,'\\'))
ERR_MSG_RET("E_DMNCAP");
if (strchr(str,':'))
ERR_MSG_RET("E_DMNCAP");
exfrcfg.RemoveAll();
exfrcfg.AddTail(str);
exfrcfg.AddTail(m_check_16bit.GetCheck() ? "1" : "0");
exfrcfg.SaveToFile("exfrtool.cfg");
CDialog::OnOK();
}