本文整理汇总了C++中CDuiString::Append方法的典型用法代码示例。如果您正苦于以下问题:C++ CDuiString::Append方法的具体用法?C++ CDuiString::Append怎么用?C++ CDuiString::Append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDuiString
的用法示例。
在下文中一共展示了CDuiString::Append方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnCreate
LRESULT CShadowWindow::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
// 使用xml字符串形式加载皮肤,内容很简单,一个Container控件就够了!Window要有bktrans属性
CDuiString xml;
xml.Append(_T("<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>"));
xml.Append(_T("<Window size=\"%d,%d\" bktrans=\"true\">"));
xml.Append(_T(" <Container />"));
xml.Append(_T("</Window>"));
xml.Format(xml.GetData(), m_pShadowUI->GetFixedWidth(), m_pShadowUI->GetFixedHeight());
m_pManager->Init(m_hWnd);
CDialogBuilder builder;
CControlUI* pRoot = builder.Create((LPCTSTR)xml, (UINT)0, NULL, m_pManager);
if (pRoot == NULL)
{
MessageBox(m_hWnd, _T("加载资源文件失败"), _T("错误"), MB_OK | MB_ICONERROR);
ExitProcess(1);
return 0;
}
m_pManager->AttachDialog(pRoot);
// 为主窗口设置一个属性,内容为阴影窗口的指针,然后子类化主窗口
::SetProp(m_hWndOwner, SHADOW_WINDOW_PROP, (HANDLE) this);
m_pOldOwnerProc = (WNDPROC) ::SetWindowLongPtr(m_hWndOwner, GWL_WNDPROC, (LONG) OwnerProc);
return 0;
}
示例2: OpenDir
void CFileUtil::OpenDir(HWND hwndOwner,CDuiString path,CDuiString fileName)
{
CDuiString str;
str.Format(L"/select,%s",path);
str.Append(L"\\");
str.Append(fileName);
ShellExecute(hwndOwner,_T("open"),_T("Explorer.exe"),str,NULL,SW_SHOWNORMAL);
}
示例3:
CDuiString CDuiString::operator+(LPCTSTR lpStr) const
{
ASSERT(!::IsBadStringPtr(lpStr,-1));
CDuiString sTemp = *this;
sTemp.Append(lpStr);
return sTemp;
}
示例4: DoApplyData
void RedisConfigUI::DoApplyData()
{
CEditUI exampleEditUI;
CComboUI exampleComboUI;
RedisClient::TDicConfig::const_iterator it = m_dicConfig.begin();
RedisClient::TDicConfig::const_iterator itend = m_dicConfig.end();
RedisClient::TDicConfig config;
for ( ; it!=itend; ++it)
{
CDuiString name = _T("redisconfig_");
CDuiString key = CharacterSet::ANSIToUnicode(it->first).c_str();
name.Append(key);
CControlUI* pCtl = GetPaintMgr()->FindControl(name);
string val ;
if (pCtl->GetClass() == exampleEditUI.GetClass())
{
CEditUI* pEdit = static_cast<CEditUI*> (pCtl);
val = CharacterSet::UnicodeToANSI(pEdit->GetText().GetData());
}
else if (pCtl->GetClass() == exampleComboUI.GetClass())
{
CComboUI* pCombo = static_cast<CComboUI*> (pCtl);
int idx = pCombo->GetCurSel();
if (it->first == "loglevel")
{
if (idx == 0) val = "debug";
else if (idx == 1) val = "verbose";
else if (idx == 2) val = "notice";
else if (idx == 3) val = "warning";
}
else
{
if (idx == 0) val = "yes";
else if (idx == 1) val = "no";
}
}
if (val != it->second)
{
config.insert(std::make_pair(it->first, val));
}
}
if (SetConfig(config) && GetConfig())
{
DoFillData();
}
}
示例5: GetItemText
LPCTSTR ConnInfoUI::GetItemText( CControlUI* pControl, int iIndex, int iSubItem )
{
const std::string& str = m_dicServerInfo[iSubItem][iIndex];
if (iSubItem == 3 && !str.empty()) {
CDuiString authStr;
for (std::size_t idx=0; idx<str.size(); ++idx)
{
authStr.Append(_T("*"));
}
pControl->SetUserData(authStr.GetData());
} else {
pControl->SetUserData(Base::CharacterSet::ANSIToUnicode(str).c_str());
}
return pControl->GetUserData();
}
示例6: DoFillData
void RedisConfigUI::DoFillData()
{
CEditUI exampleEditUI;
CComboUI exampleComboUI;
RedisClient::TDicConfig::const_iterator it = m_dicConfig.begin();
RedisClient::TDicConfig::const_iterator itend = m_dicConfig.end();
for ( ; it!=itend; ++it)
{
CDuiString name = _T("redisconfig_");
CDuiString key = Base::CharacterSet::ANSIToUnicode(it->first).c_str();
CDuiString val = Base::CharacterSet::ANSIToUnicode(it->second).c_str();
name.Append(key);
CControlUI* pCtl = GetPaintMgr()->FindControl(name);
/// xml中未配置该项
if (pCtl == NULL) continue;
if (pCtl->GetClass() == exampleEditUI.GetClass())
{
CEditUI* pEdit = static_cast<CEditUI*> (pCtl);
pEdit->SetText(val);
}
else if (pCtl->GetClass() == exampleComboUI.GetClass())
{
CComboUI* pCombo = static_cast<CComboUI*> (pCtl);
int idx = 0;
if (val == _T("yes")) idx = 0;
else if (val == _T("no")) idx = 1;
else if (it->first == "loglevel")
{
string loglevel = it->second;
if (loglevel == "debug") idx = 0;
else if (loglevel == "verbose") idx = 1;
else if (loglevel == "notice") idx = 2;
else if (loglevel == "warning") idx = 3;
}
pCombo->SetInternVisible(true);
pCombo->SelectItem(idx);
pCombo->SetFocus();
}
}
}
示例7:
CDuiString CDuiString::operator+(const CDuiString& src) const
{
CDuiString sTemp = *this;
sTemp.Append(src);
return sTemp;
}