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


C++ CLabelUI类代码示例

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


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

示例1: ClearSearchResult

void CSearchBussinessPartnerPage::ClearSearchResult()
{
	CButtonUI* pBtnAvatar = static_cast<CButtonUI*>(m_PaintManager.FindControl(btn_avatar));
	if (NULL != pBtnAvatar)
	{	
		pBtnAvatar->SetBkImage(_T(""));
	}

	CLabelUI* pLabelNickname = static_cast<CLabelUI*>(m_PaintManager.FindControl(label_nick));
	if (NULL != pLabelNickname)
	{
		pLabelNickname->SetText(_T(""));
	}

	CLabelUI* pLabelCompany = static_cast<CLabelUI*>(m_PaintManager.FindControl(label_company));
	if (NULL != pLabelCompany)
	{
		pLabelCompany->SetText(_T(""));
	}

	CButtonUI* pAddFriend = static_cast<CButtonUI*>(m_PaintManager.FindControl(btn_add_friend));
	if (NULL != pAddFriend)
	{
		pAddFriend->SetVisible(false);
	}

	if (NULL != m_pCurUserInfo)
	{
		delete m_pCurUserInfo;
		m_pCurUserInfo = NULL;
	}
}
开发者ID:Hopedream,项目名称:mm-win,代码行数:32,代码来源:SearchBussinessPartnerPage.cpp

示例2: APP_LOG

void SessionLayout::_AddGroupMemberToList(IN const std::string& sID)
{
	module::UserInfoEntity userInfo;
	if (!module::getUserListModule()->getUserInfoBySId(sID, userInfo))
	{
		APP_LOG(LOG_ERROR, _T("SessionLayout::_updateGroupMembersList(),can't find the userInfo"));
		return;
	}
	CDialogBuilder dlgBuilder;
	CListContainerElementUI* pListElement = (CListContainerElementUI*)dlgBuilder.Create(_T("SessionDialog\\groupMembersListItem.xml"), (UINT)0, NULL, &m_paint_manager);
	if (!pListElement)
	{
		APP_LOG(LOG_ERROR, _T("群item创建失败"));
		return;
	}
	CButtonUI* pLogo = static_cast<CButtonUI*>(pListElement->FindSubControl(_T("AvatarInfo")));
	if (!pLogo)
	{
		return;
	}
	pLogo->SetBkImage(util::stringToCString(userInfo.getAvatarPath()));

	CLabelUI* pNameLable = static_cast<CLabelUI*>(pListElement->FindSubControl(_T("nickname")));
	if (!pNameLable)
	{
		return;
	}
	pNameLable->SetText(userInfo.getRealName());
	pListElement->SetUserData(util::stringToCString(userInfo.sId));

	m_pGroupMemberList->Add(pListElement);

}
开发者ID:3rdexp,项目名称:TTWinClient,代码行数:33,代码来源:SessionLayout.cpp

示例3: LOG__

void SessionLayout::_AddGroupMemberToList(IN const std::string& sID, IN const BOOL bCreator)
{
	module::UserInfoEntity userInfo;
	if (!module::getUserListModule()->getUserInfoBySId(sID, userInfo))
	{
		LOG__(ERR, _T("can't find the userInfo:%s,GroupId:%s"),util::stringToCString(sID),util::stringToCString(m_sId));
		return;
	}
	CDialogBuilder dlgBuilder;
	CListContainerElementUI* pListElement = (CListContainerElementUI*)dlgBuilder.Create(_T("SessionDialog\\groupMembersListItem.xml"), (UINT)0, NULL, &m_paint_manager);
	if (!pListElement)
	{
		LOG__(ERR, _T("群item创建失败"));
		return;
	}
	CButtonUI* pLogo = static_cast<CButtonUI*>(pListElement->FindSubControl(_T("AvatarInfo")));
	PTR_VOID(pLogo);
	pLogo->SetBkImage(util::stringToCString(userInfo.getAvatarPath()));

	if (bCreator)
	{
		CButtonUI* pCreator = static_cast<CButtonUI*>(pListElement->FindSubControl(_T("Creator")));
		PTR_VOID(pCreator);
		pCreator->SetVisible(true);
		pCreator->SetUserData(_T("Creator"));
	}

	CLabelUI* pNameLable = static_cast<CLabelUI*>(pListElement->FindSubControl(_T("nickname")));
	PTR_VOID(pNameLable);
	pNameLable->SetText(userInfo.getRealName());
	pListElement->SetUserData(util::stringToCString(userInfo.sId));

	m_pGroupMemberList->Add(pListElement);
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:34,代码来源:SessionLayout.cpp

示例4: Hot

bool CMusicListItemUI::Hot(bool bHot)
{

	if( !IsEnabled()) return false;
	if (m_pMusicListHotTab == NULL)
		m_pMusicListHotTab = static_cast<CTabLayoutUI*>(m_pManager->FindSubControlByName(this, kMusicHotTabControlName));

	if ( m_pMusicListHotTab != NULL )
	{
		CButtonUI	*pBtnPalyButton = static_cast<CButtonUI*>(m_pManager->FindSubControlByName(this, kPlayControlControlName));
		CLabelUI	*pLblMusicIndex = static_cast<CLabelUI*>(m_pManager->FindSubControlByName(this, kMusicIndexControlName));
		if ( pBtnPalyButton == NULL || pLblMusicIndex == NULL )
			return false;
		if (bHot)
		{
			m_pMusicListHotTab->SelectItem(1);
			pBtnPalyButton->SetVisible(true);
			pLblMusicIndex->SetVisible(false);
		}
		else
		{
			m_pMusicListHotTab->SelectItem(0);
			pBtnPalyButton->SetVisible(false);
			pLblMusicIndex->SetVisible(true);
		}
	}
	Invalidate();
	return true;
}
开发者ID:276361270,项目名称:DuiLib_Redrain,代码行数:29,代码来源:UIMusicList.cpp

示例5: GetItemBySId

BOOL CUIRecentSessionList::UpdateItemConentBySId(IN const std::string& sId)
{
	Node* pNode = GetItemBySId(sId);
	PTR_FALSE(pNode);
	CControlUI* pListElement = pNode->data().list_elment_;
	PTR_FALSE(pListElement);

	CLabelUI* plastMsgTimeUI = static_cast<CLabelUI*>(paint_manager_.FindSubControlByName(pListElement, lastContentTimeControlName));
	if (!plastMsgTimeUI)
	{
		return FALSE;
	}
	CLabelUI* plastMsgUI = static_cast<CLabelUI*>(paint_manager_.FindSubControlByName(pListElement, klastmsgControlName));
	if (!plastMsgUI)
	{
		return FALSE;
	}
	CLabelUI* Unreadcnt_button = static_cast<CLabelUI*>(paint_manager_.FindSubControlByName(pListElement, kUnreadcntControlName));
	if (!Unreadcnt_button)
	{
		return FALSE;
	}
	
	//更新会话的最后一条消息
	module::SessionEntity*  pSessionEntity = SessionEntityManager::getInstance()->getSessionEntityBySId(sId);
	if (!pSessionEntity)
	{
		LOG__(ERR, _T("Can't find the SessionEntity"));
		return FALSE;
	}
	std::string msgDecrptyCnt;
	DECRYPT_MSG(pSessionEntity->latestMsgContent, msgDecrptyCnt);
	CString strContent = util::stringToCString(msgDecrptyCnt);
	ReceiveMsgManage::getInstance()->parseContent(strContent, TRUE, 400);//需要转换成本地的格式

	module::UserInfoEntity userInfo;
	CString strMsgTalkName;
	if (module::SESSION_GROUPTYPE == pSessionEntity->sessionType &&//只有群需要展示 消息的发送者
		module::getUserListModule()->getUserInfoBySId(pSessionEntity->latestMsgFromId, userInfo))
	{
		strMsgTalkName = userInfo.getRealName();
		strMsgTalkName += CString(_T(":"));
	}
	strContent = strMsgTalkName + strContent;
	plastMsgUI->SetText(strContent);

	if (!SessionDialogManager::getInstance()->findSessionDialogBySId(sId))//窗口不存在的时候更新计数
	{
		//更新未读计数
		UInt32 nCnt = ReceiveMsgManage::getInstance()->getUnReadMsgCountBySId(sId);
        SetTextUICount(Unreadcnt_button, nCnt);
	}

	//更新消息的时间
	CString strTime = module::getMiscModule()->makeShortTimeDescription(pSessionEntity->updatedTime);
	plastMsgTimeUI->SetText(strTime);
	
	sort();
	return TRUE;
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:60,代码来源:UIRecentSessionList.cpp

示例6: OnWeiboContentNotify

bool main_frame::OnWeiboContentNotify( void *param )
{
	TNotifyUI *pNotify = (TNotifyUI *)param;
	if (_tcsicmp(pNotify->pSender->GetName() ,  _T("weiboContent")) == 0)
	{
		CRichEditUI *pRichEdit = static_cast<CRichEditUI*>(pNotify->pSender);
		if (pRichEdit && (_tcsicmp(pNotify->sType,_T("richEditTxViewChanged")) == 0))
		{
			CDuiString strText = pRichEdit->GetText();
			int length = strText.GetLength();
			if (length < 140)
			{
				CDuiString strLimit;
				strLimit.Format(_T("%d"),140-length);
				CLabelUI *pLabel = static_cast<CLabelUI*>(m_PaintManager.FindControl(_T("limitTextLength")));
				if (pLabel)
				{
					pLabel->SetText(strLimit);
				}
			}
		}

	}	
	return true;
}
开发者ID:lyl,项目名称:MagiccWeibo,代码行数:25,代码来源:main_frame.cpp

示例7: 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

示例8: SetItemData

void CListUIEx::SetItemData(int nItem,
							int nColumn,
							LPCTSTR Text, LPCTSTR Name)
{
	CLabelUI *pLabel = new CLabelUI;
	pLabel->SetText(Text);//控件属性就根据需求设置吧,我简单设置一下
	pLabel->SetTextStyle(DT_CENTER);
	pLabel->SetAttribute("endellipsis", "true");
	pLabel->SetName(Name);
	SetItemData(nItem, nColumn, pLabel);//添加到父控件
}
开发者ID:obabywawa,项目名称:UPIM,代码行数:11,代码来源:ListEx.cpp

示例9: CLabelUI

void CHelloDuilibWnd::InitWindow()
{
	CLabelUI* helloTxUI = static_cast<CLabelUI*>(m_PaintManager.FindControl(_T("apptitle")));
	helloTxUI->SetText(_T("hehe"));
	CButtonUI* btnClose = static_cast<CButtonUI*>(m_PaintManager.FindControl(_T("closebtn")));
	CVerticalLayoutUI* layoutBody = static_cast<CVerticalLayoutUI*>(m_PaintManager.FindControl(_T("body")));

	CLabelUI* txtUI = new CLabelUI();
	layoutBody->Add(txtUI);
	txtUI->SetFloat(true);
	txtUI->SetPos({ 10, 300, 0, 0 });
	txtUI->SetFixedWidth(200);
	txtUI->SetFixedHeight(20);
	txtUI->SetText(_T("Hello Dynamic Text"));

	btnClose->OnEvent += MakeDelegate(this, &CHelloDuilibWnd::OnCloseClicked);

	CDialogBuilder builder;
	CVerticalLayoutUI* userControl = static_cast<CVerticalLayoutUI*>(builder.Create(_T("HelloControl.xml"),(LPCTSTR)0));
	CControlUI* testLabel = userControl->FindSubControl(_T("myLabel"));
	layoutBody->Add(userControl);

	layoutBody->NeedUpdate();
	
	CControlUI* myLabel = static_cast<CLabelUI*>(m_PaintManager.FindControl(_T("myLabel")));
	
	if (myLabel)
	{
	}

}
开发者ID:fmj1980,项目名称:duilib,代码行数:31,代码来源:CHelloWnd.cpp

示例10: SetExplandIcon

void MenuElementUI::SetExplandIcon(LPCTSTR iconName)
{
	if(EXPLAND_ICON_WIDTH <= 0)
		return;
	CString str;
	if (iconName != L"")
	{
		str.Format(L"{i %s }",iconName);
	}
	CLabelUI *icon = new CLabelUI;
	icon->SetShowHtml(true);
	icon->SetText(str);
	icon->SetFixedWidth(EXPLAND_ICON_WIDTH);
	m_Layout->Add(icon);
}
开发者ID:zsjtoby,项目名称:iume,代码行数:15,代码来源:MultiMenu.cpp

示例11: LUA_METHOD_IMPL

	LUA_METHOD_IMPL(CLabelUI, GetFont)
	{
		try
		{
			CLabelUI* self;
			self = static_cast<CLabelUI*>(LuaStatic::CheckUserData(l, 1));
			int iFont = self->GetFont();
			lua_pushinteger(l, (lua_Integer)iFont);
			return 1;
		}
		catch (...)
		{
			DuiException(_T("LuaCLabelUI::GetFont"));
			return 0;
		}
	}
开发者ID:hjhong,项目名称:MyDuiLib,代码行数:16,代码来源:Lua_CLabelUI.cpp

示例12: _T

bool CBookClient::AddNode(BOOK_INFO *item)
{
	if (item == NULL)	return false;

	BOOK_INFO *node	= new BOOK_INFO;
	node->strName	= item->strName;
	node->nImage	= item->nImage;
	node->strPath	= item->strPath;
	node->nBookmark	= item->nBookmark;

	CContainerUI* pDesk = NULL;
	if( !m_dlgBuilder.GetMarkup()->IsValid() )
	{
		pDesk = static_cast<CContainerUI*>(m_dlgBuilder.Create(_T("iBook.xml"), (UINT)0, NULL, &m_pm));
	}
	else
	{
		pDesk = static_cast<CContainerUI*>(m_dlgBuilder.Create((UINT)0, &m_pm));
	}

	if( pDesk != NULL )	
	{
		this->Add(pDesk);

		CButtonUI* btn = static_cast<CButtonUI*>(m_pm.FindSubControlByName(pDesk, _T("btnBookEx")));
		CLabelUI *text = static_cast<CLabelUI*>(m_pm.FindSubControlByName(pDesk, _T("labelBookEx")));
		CButtonUI *btnEdit = static_cast<CButtonUI*>(m_pm.FindSubControlByName(pDesk, _T("btnbookdel")));
		if (btn == NULL || text == NULL || btnEdit == NULL)	return false;

		CDuiString strImage;
		strImage.Format(_T("book\\%02d.png"), node->nImage);
		btn->SetBkImage(strImage);
		text->SetText(node->strName);
		btnEdit->SetVisible(m_bEdit);

		pDesk->SetTag((UINT_PTR)node);
	}
	else
	{
		delete node;
		node = NULL;

		return false;
	}

	return true;
}
开发者ID:wyrover,项目名称:iume,代码行数:47,代码来源:BookClient.cpp

示例13: LOG__

void CreateDiscussionGrpDialog::_updateSearchResultList(IN const std::vector<std::string>& nameList)
{
	if (nameList.empty())
	{
		return;
	}
	for (std::string sid : nameList)
	{
		module::UserInfoEntity userInfo;
		if (!module::getUserListModule()->getUserInfoBySId(sid, userInfo))
		{
			LOG__(ERR, _T("can't find the userInfo:%s"), util::stringToCString(sid));
			return;
		}
		CDialogBuilder dlgBuilder;
		CListContainerElementUI* pListElement = (CListContainerElementUI*)dlgBuilder.Create(_T("CreateDiscussionGrpDialog\\ListGroupMembersItem.xml"), (UINT)0, NULL, &m_PaintManager);
		if (!pListElement)
		{
			LOG__(ERR, _T("群item创建失败"));
			return;
		}
		pListElement->SetName(_T("SearchResultItem"));
		CControlUI* pLogo = static_cast<CControlUI*>(pListElement->FindSubControl(_T("AvatarInfo")));
		if (!pLogo)
		{
			return;
		}
		pLogo->SetBkImage(util::stringToCString(userInfo.getAvatarPath()));

		CLabelUI* pNameLable = static_cast<CLabelUI*>(pListElement->FindSubControl(_T("nickname")));
		if (!pNameLable)
		{
			return;
		}
		pNameLable->SetText(userInfo.getRealName());

		CButtonUI* pRemoveBtn = static_cast<CButtonUI*>(pListElement->FindSubControl(_T("removebtn")));
		if (pRemoveBtn)
		{
			pRemoveBtn->SetVisible(false);
		}

		pListElement->SetUserData(util::stringToCString(userInfo.sId));

		m_pListSearchResult->Add(pListElement);
	}
}
开发者ID:hlyces,项目名称:teamtalk_TT,代码行数:47,代码来源:CreateDiscussionGrpDialog.cpp


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