本文整理汇总了C++中CSetting::GetNameAt方法的典型用法代码示例。如果您正苦于以下问题:C++ CSetting::GetNameAt方法的具体用法?C++ CSetting::GetNameAt怎么用?C++ CSetting::GetNameAt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSetting
的用法示例。
在下文中一共展示了CSetting::GetNameAt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: types
void CHello2Dlg::OnProcessSel(int id)
{
int curch = m_chlist.GetCurSel();
if(m_cmdbase == ID_32773) //data operation
{
CList<double,double> *data = &m_ridlgs[curch]->m_data;
if(m_ridlgs[curch]->show_type == SHOW_ORGDATA)
data = &m_ridlgs[curch]->m_output;
if(id == 1) //show converted result
{
m_ridlgs[curch]->show_type = SHOW_MAINDATA;
}
if(id == 2) //show raw result
{
m_ridlgs[curch]->show_type = SHOW_ORGDATA;
}
if(id == 3) //delete the current record
{
int pos = m_history.GetCurSel();
if((pos >= 0) && (data))
{
POSITION p = data->GetHeadPosition();
while(pos-- > 0 )
data->GetNext(p);
data->RemoveAt(p);
}
}
if(id == 4) //delete all the record
{
data->RemoveAll();
}
if(id == 5) //export all the record
{
CFile cf;
if(!cf.Open(DATAOUT_NAME,CFile::modeCreate|CFile::modeWrite))
return;
//write to txt and open with notepad
if(data && (data->GetCount() > 0))
{
POSITION pos = data->GetHeadPosition();
char r[50];
do{
double v = data->GetAt(pos);
sprintf(r,"%8f\r\n",v);
cf.Write(r,strlen(r));
if(pos == data->GetTailPosition())
break;
data->GetNext(pos);
}while(1);
}
cf.Close();
SHELLEXECUTEINFO execInf;
ZeroMemory (&execInf, sizeof (execInf));
execInf.cbSize = sizeof (SHELLEXECUTEINFO);
execInf.fMask = SEE_MASK_NOCLOSEPROCESS;
execInf.nShow = SW_SHOWNORMAL;
execInf.lpFile = _T("\\windows\\pword.exe");
execInf.lpVerb = _T("open");
execInf.lpParameters = DATAOUT_NAME;
ShellExecuteEx (&execInf);
}
}
if(m_cmdbase == ID_32772)
{
if(id == 1)
{
m_ridlgs[curview]->sidedata = NULL;
}else{
m_ridlgs[curview]->sidedata = &m_ridlgs[id-2]->m_data;
m_ridlgs[curview]->side_ch = id-2;
}
m_ridlgs[curview]->SaveLastConfig();
}
if(m_cmdbase == ID_32771) //channel config
{
if(m_cfgtype == CFGTYPE_BORE)
{
CSetting<PROBECFG> prbset;
prbset.InstallFromFile(PRB_DEFINFO);
if(id == 1)//just close it
{
m_ridlgs[curch]->cfg_now = CFGTYPE_NONE;
for(int i=0;i<sizeof(m_ridlgs)/sizeof(CRunitemDialog*);i++){
if((m_ridlgs[i]->cfg_now == CFGTYPE_BORE) && (i != curch) && (m_ridlgs[i]->side_ch == curch))
{
m_ridlgs[i]->sidedata = NULL;
}
}
}else{
m_ridlgs[curch]->m_prbid = prbset.GetNameAt(id-2);
m_ridlgs[curch]->cfg_now = CFGTYPE_BORE;
//.........这里部分代码省略.........