当前位置: 首页>>代码示例>>C++>>正文


C++ CLabelUI::GetText方法代码示例

本文整理汇总了C++中CLabelUI::GetText方法的典型用法代码示例。如果您正苦于以下问题:C++ CLabelUI::GetText方法的具体用法?C++ CLabelUI::GetText怎么用?C++ CLabelUI::GetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CLabelUI的用法示例。


在下文中一共展示了CLabelUI::GetText方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AddToBlackList

void CVisitor::AddToBlackList(TNotifyUI& msg)
{
	CListContainerElementUI* pContainer = (CListContainerElementUI*)msg.pSender->GetTag();
	CLabelUI* pID = static_cast<CLabelUI*>(m_pManager->FindSubControlByName(pContainer,_T("VisitorIdentity")));
	std::string	strID = pID->GetText().GetStringA();
	CLabelUI* pName = static_cast<CLabelUI*>(m_pManager->FindSubControlByName(pContainer,_T("Visitorname")));
	std::string	strName = pName->GetText().GetStringA();
	CLabelUI* pAddr = static_cast<CLabelUI*>(m_pManager->FindSubControlByName(pContainer,_T("VisitorAddr")));
	std::string strAddr = pAddr->GetText().GetStringA();
	CLabelUI* pPhone = static_cast<CLabelUI*>(m_pManager->FindSubControlByName(pContainer,_T("VisitorMobile")));
	std::string strPhone = pPhone->GetText().GetStringA();
	CLabelUI* pGender = static_cast<CLabelUI*>(m_pManager->FindSubControlByName(pContainer,_T("VisitorGender")));
	std::string strGender = pGender->GetText().GetStringA();
	if (strGender == "男")
	{
		strGender = "1";
	}
	else
	{
		strGender = "2";
	}
	std::string y = "'";
	std::string d = ",";
	std::string strsql = "insert into blacklist(name,identity_num,gender,address,phone) values("+y+strName+y+d+y+strID+y+d+y+strGender+y+d+y+strAddr+y+d+y+strPhone+y+")";
	CLoginWnd::m_mySql.Execute(strsql);
	std::string sqlstr = "delete from visitor where identity_num="+y+strID+y;
	CLoginWnd::m_mySql.Execute(sqlstr);
	Paging();
}
开发者ID:Forlearngit,项目名称:VisitorManager,代码行数:29,代码来源:Visitor.cpp

示例2: _GetGroupNameListByShortName

void SessionLayout::_GetGroupNameListByShortName(IN const CString& sShortName, OUT std::vector<string>& nameList)
{
	for (int n = 0; n < m_pGroupMemberList->GetCount();++n)
	{
		CListContainerElementUI* pListElement = static_cast<CListContainerElementUI*>(m_pGroupMemberList->GetItemAt(n));
		if (pListElement)
		{
			CLabelUI* pNameLable = static_cast<CLabelUI*>(pListElement->FindSubControl(_T("nickname")));
			if (!pNameLable)
			{
				continue;;
			}
			CString Name = pNameLable->GetText();
			std::string sid = util::cStringToString(CString(pListElement->GetUserData()));

			if (util::isIncludeChinese(util::cStringToString(sShortName, CP_ACP)))//检索中文
			{
				if (Name.Find(sShortName) != -1)
				{
					nameList.push_back(sid);
				}
			}
			else//检索字母
			{
				CString firstPY = util::HZ2FirstPY(util::cStringToString(Name, CP_ACP));
				if (firstPY.Find(sShortName) != -1)//先检索简拼
				{
					nameList.push_back(sid);
				}
				else
				{
					CString allPY = util::HZ2AllPY(Name);//再检索全拼
					if (allPY.Find(sShortName) != -1)
					{
						nameList.push_back(sid);
					}
				}
			}
		}
	}
}
开发者ID:3rdexp,项目名称:TTWinClient,代码行数:41,代码来源:SessionLayout_Event.cpp

示例3: InitWindow

void MessageBoxWhd::InitWindow()
{
    CLabelUI* pLbl = NULL;
    CControlUI* pCtl = NULL;
    if (m_uType == Info)
    {
         pLbl = static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("lab_msg_info")));
         pCtl =  static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("ctl_msg_info")));
    }
    else if (m_uType == Warn)
    {
        pLbl = static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("lab_msg_warn")));
        pCtl = static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("ctl_msg_warn")));
    }
    else if (m_uType == Error)
    {
        pLbl = static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("lab_msg_error")));
        pCtl =  static_cast<CLabelUI*> (m_PaintManager.FindControl(_T("ctl_msg_error")));
    }
    pLbl->SetVisible(true);
    pCtl->SetVisible(true);

    std::stringstream ss;
    ss<<"lbl_msg_"<<m_uMsgCode;
    CLabelUI* pTextUI = static_cast<CLabelUI*> (m_PaintManager.FindControl(Base::CharacterSet::ANSIToUnicode(ss.str()).c_str()));
    if (pTextUI)
    {
        pTextUI->SetVisible(true);
        if (!m_dstrExMsg.IsEmpty())
        {
            CDuiString theMsg = pTextUI->GetText();
            theMsg.Replace(_T("$"), m_dstrExMsg);
            pTextUI->SetText(theMsg);
        }
    }
}
开发者ID:3rdexp,项目名称:RedisStudio,代码行数:36,代码来源:MessageBoxWhd.cpp


注:本文中的CLabelUI::GetText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。