本文整理汇总了C++中ConfigSection::GetString方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigSection::GetString方法的具体用法?C++ ConfigSection::GetString怎么用?C++ ConfigSection::GetString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigSection
的用法示例。
在下文中一共展示了ConfigSection::GetString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BeforeLoadFrame
BOOL CMainFrame::BeforeLoadFrame(CFrameWnd* pMainWnd)
{
m_mainwnd = pMainWnd;
m_frameNode = g_factoryRoot.GetSection(L"mainframe");
m_appid = g_factoryRoot->GetString(L"_appid");
m_appname = g_factoryRoot->GetString(L"appname");
m_id = GetNodeID(m_frameNode, L"id");
ASSERT(!m_appname.empty());
m_barsfile = getConfigPath() + g_factoryRoot->GetString(L"cmdbarsFile", L"cmdbars.xml");
return TRUE;
}
示例2: CreateRibbonBar
BOOL CMainFrame::CreateRibbonBar()
{
std::wstring xcbfile(getConfigPath() + g_factoryRoot->GetString(L"xcbfile"));
CFile file(xcbfile.c_str(), CFile::modeRead);
CArchive ar(&file, CArchive::load);
m_cmdbars->LoadDesignerBars(ar);
CXTPRibbonBar* pRibbonBar = DYNAMIC_DOWNCAST(
CXTPRibbonBar, m_cmdbars->GetMenuBar());
if (NULL == pRibbonBar)
return FALSE;
SetRibbonFont();
std::wstring themeName(getUIOptions()->GetString(L"themeName"));
if (themeName.find(L"WINDOWS7") != std::wstring::npos
|| themeName.find(L"OFFICE201") != std::wstring::npos)
{
pRibbonBar->GetSystemButton()->SetStyle(xtpButtonCaption);
}
pRibbonBar->EnableFrameTheme();
return TRUE;
}
示例3: RegisterDocTemplate
void CFrameWndFactory::RegisterDocTemplate(bool mdi, const ConfigSection& frame,
const ConfigSection& views)
{
UINT id = frame->GetUInt32(L"id");
ASSERT(id != 0);
ViewItem item;
if (mdi)
{
for (int i = 0; i < 20; i++)
{
ConfigSection view(views.GetSectionByIndex(L"view", i));
if (!view->IsValid())
break;
item.frameID = view->GetUInt32(L"id", id);
item.layout = view->GetString(L"layout");
item.caption = view->GetString(L"caption");
item.clsid = view->GetString(L"clsid");
item.pTemplate = new CMultiDocTemplate(
item.frameID,
RUNTIME_CLASS(CDummyDoc),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CEmbedView));
AfxGetApp()->AddDocTemplate(item.pTemplate);
s_views.push_back(item);
}
}
else
{
item.pTemplate = new CSingleDocTemplate(id,
RUNTIME_CLASS(CDummyDoc),
RUNTIME_CLASS(CMainSDIFrame),
RUNTIME_CLASS(CEmbedView));
AfxGetApp()->AddDocTemplate(item.pTemplate);
item.clsid = frame->GetString(L"viewClsid");
if (!item.clsid.empty())
s_views.push_back(item);
}
}
示例4: GetNodeID
UINT CMainFrame::GetNodeID(const ConfigSection& node, LPCWSTR name)
{
UINT id = node->GetUInt32(name);
std::wstring strname(node->GetString(name));
size_t pos = strname.find(L' ');
if (id != 0 && pos != strname.npos)
{
strname = strname.substr(pos + 1);
TRACE2("String ID: %d, %s\n", id, strname.c_str());
ASSERT(strname.find(L' ') == strname.npos && !strname.empty());
std::map<std::wstring, UINT>::iterator it = m_idnames.find(strname);
ASSERT_MESSAGE(it == m_idnames.end() || it->second == id,
"A string name must has only one ID value in the factory xml.");
m_idnames[strname] = id;
}
return id;
}