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


C++ CControlUI::SetBkColor方法代码示例

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


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

示例1: Receive

BOOL ChatDialog::Receive(SkinChangedParam param)
{
	bgimage_ = param.bgimage;
	bkcolor_ = param.bkcolor;
	CControlUI* background = paint_manager_.FindControl(kBackgroundControlName);
	if (background != NULL)
	{
		if (!param.bgimage.empty())
		{
			TCHAR szBuf[MAX_PATH] = {0};
#if defined(UNDER_WINCE)
			_stprintf(szBuf, _T("file='%s' corner='600,200,1,1'"), param.bgimage.c_str());
#else
			_stprintf_s(szBuf, MAX_PATH - 1, _T("file='%s' corner='600,200,1,1'"), param.bgimage.c_str());
#endif
			background->SetBkImage(szBuf);
		}
		else
			background->SetBkImage(_T(""));

		background->SetBkColor(param.bkcolor);
	}

	return TRUE;
}
开发者ID:hxf829,项目名称:duilibtest,代码行数:25,代码来源:chat_dialog.cpp

示例2: Receive

 BOOL CLoginWindow::Receive(SkinChangedParam param)
 {
	 try
	 {
		 if(!IsWindow()) return FALSE;
		 sLog("CLoginWindow::Receive");
		 CDuiString bgimage_ = param.bgimage;
		 DWORD bkcolor_ = param.bkcolor;
		 CControlUI* background = GetPaintMgr()->GetRoot();
		 if (background != NULL&&0!=bgimage_.Compare(background->GetBkImage()))
		 {
			 if (!param.bgimage.IsEmpty())
			 {
				 CDuiString sBkImage = bgimage_;

				 background->SetBkImage(sBkImage);
			 }
			 else
				 background->SetBkImage(_T(""));

			 background->SetBkColor(param.bkcolor);
		 }

		 return TRUE;
	 }
	 catch (...)
	 {
		 sLogError("CLoginWindow::Receive");
		 throw _T("CLoginWindow::Receive");
		 return FALSE;
	 }	
 }
开发者ID:yuechuanbingzhi163,项目名称:myduilib,代码行数:32,代码来源:LoginWindow.cpp

示例3: SetBkColor

void CAbout::SetBkColor(DWORD dwBackColor)
{
	CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
	if (background != NULL)
	{
		background->SetBkImage(_T(""));
		background->SetBkColor(dwBackColor);
		background->NeedUpdate();
	}
}
开发者ID:wyrover,项目名称:myduilib1,代码行数:10,代码来源:About.cpp

示例4: SetBkColor

void CMessageDialog::SetBkColor(DWORD dwBackColor)
{
	CControlUI* background = m_pm.FindControl(kWndBackGround);
	if (background != NULL)
	{
		background->SetBkImage(_T(""));
		background->SetBkColor(dwBackColor);
		background->NeedUpdate();
	}

}
开发者ID:wyrover,项目名称:GDES,代码行数:11,代码来源:MessageDialog.cpp

示例5: SetBkColor

void MainFrame::SetBkColor(DWORD dwBackColor)
{
	CControlUI* background = paint_manager_.FindControl(kBackgroundControlName);
	if (background != NULL)
	{
		background->SetBkImage(_T(""));
		background->SetBkColor(dwBackColor);
		background->NeedUpdate();

		SkinChangedParam param;
		param.bkcolor = background->GetBkColor();
		param.bgimage = background->GetBkImage();
		skin_changed_observer_.Broadcast(param);
	}
}
开发者ID:fftyjw,项目名称:cdui,代码行数:15,代码来源:main_frame.cpp

示例6: OnPrepare

void ChatDialog::OnPrepare(TNotifyUI& msg)
{
	TCHAR szBuf[MAX_PATH] = {0};

	CControlUI* background = paint_manager_.FindControl(kBackgroundControlName);
	if (background != NULL)
	{
#if defined(UNDER_WINCE)
		_stprintf(szBuf, _T("file='%s' corner='600,200,1,1'"), bgimage_.c_str());
#else
		_stprintf_s(szBuf, MAX_PATH - 1, _T("file='%s' corner='600,200,1,1'"), bgimage_.c_str());
#endif
		background->SetBkImage(szBuf);
		background->SetBkColor(bkcolor_);
	}

	CButtonUI* log_button = static_cast<CButtonUI*>(paint_manager_.FindControl(kLogoButtonControlName));
	if (log_button != NULL)
	{
#if defined(UNDER_WINCE)
		_stprintf(szBuf, _T("%s"), friend_.logo.c_str());
#else
		_stprintf_s(szBuf, MAX_PATH - 1, _T("%s"), friend_.logo.c_str());
#endif
		log_button->SetNormalImage(szBuf);
	}

	CControlUI* nick_name = paint_manager_.FindControl(kNickNameControlName);
	if (nick_name != NULL)
		nick_name->SetText(friend_.nick_name.c_str());

	CControlUI* desciption = paint_manager_.FindControl(kDescriptionControlName);
	if (desciption != NULL)
		desciption->SetText(friend_.description.c_str());

	CContainerUI* pFontbar = static_cast<CContainerUI*>(paint_manager_.FindControl(kFontbarControlName));
	if (pFontbar != NULL)
		pFontbar->SetVisible(!pFontbar->IsVisible());
}
开发者ID:hxf829,项目名称:duilibtest,代码行数:39,代码来源:chat_dialog.cpp


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