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


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

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


在下文中一共展示了CControlUI::SetBkImage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: SetControlData

NSDUILIB_API void  SetControlData(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
{
	TCHAR controlName[MAX_PATH];
	TCHAR controlData[MAX_PATH];
	TCHAR dataType[MAX_PATH];

	EXDLL_INIT();

	ZeroMemory(controlName, MAX_PATH*sizeof(TCHAR));
	ZeroMemory(controlData, MAX_PATH*sizeof(TCHAR));
	ZeroMemory(dataType, MAX_PATH*sizeof(TCHAR));

	popstring( controlName,sizeof(controlName));
	popstring( controlData,sizeof(controlData));
	popstring( dataType,sizeof(dataType));

	CControlUI* pControl = static_cast<CControlUI*>(g_pFrame->GetPaintManager().FindControl( controlName ));
	if( pControl == NULL )
		return;

	if( _tcsicmp( dataType, _T("text") ) == 0 )
	{
		if( _tcsicmp( controlData, _T("error")) == 0 || _tcsicmp( controlData, _T("")) == 0 )
			pControl->SetText( pControl->GetText() );
		else
			pControl->SetText( controlData );
	}
	else if( _tcsicmp( dataType, _T("bkimage") ) == 0 )
	{
		if( _tcsicmp( controlData, _T("error")) == 0 || _tcsicmp( controlData, _T("")) == 0 )
			pControl->SetBkImage( pControl->GetBkImage());
		else
			pControl->SetBkImage( controlData );
	}
	else if( _tcsicmp( dataType, _T("link") ) == 0 )
	{
		g_controlLinkInfoMap[controlName] = controlData;
	}
	else if( _tcsicmp( dataType, _T("enable") ) == 0 )
	{
		if( _tcsicmp( controlData, _T("true")) == 0 )
			pControl->SetEnabled( true );
		else if( _tcsicmp( controlData, _T("false")) == 0 )
			pControl->SetEnabled( false );
	}
	else if( _tcsicmp( dataType, _T("visible") ) == 0 )
	{
		if( _tcsicmp( controlData, _T("true")) == 0 )
			pControl->SetVisible( true );
		else if( _tcsicmp( controlData, _T("false")) == 0 )
			pControl->SetVisible( false );
	}
}
开发者ID:liao0818,项目名称:nsduilib,代码行数:53,代码来源:nsduilib.cpp

示例4: OnPrepare

void CMainFrame::OnPrepare(TNotifyUI& msg)
{
	CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
	if (background != NULL)
	{
		TCHAR szBuf[MAX_PATH] = {0};
#if defined(UNDER_WINCE)
		_stprintf(szBuf, _T("file='bg%d.png' corner='600,200,1,1'"), bk_image_index_);
#else
		_stprintf_s(szBuf, MAX_PATH - 1, _T("file='bg%d.png' corner='600,200,1,1'"), bk_image_index_);
#endif
		background->SetBkImage(szBuf);
	}
	
	UpdateFriendsList();

	UpdateGroupsList();

	UpdateMicroBlogList();

	CDuiRect rcWindow;
	GetWindowRect(m_hWnd, &rcWindow);
	rcWindow.top = rcWindow.top + msg.pSender->GetPos().bottom;
	ColorSkinWindow* pcs=new ColorSkinWindow((CMainFrame *)this, rcWindow);
}
开发者ID:wyrover,项目名称:IM,代码行数:25,代码来源:MainFrame.cpp

示例5: ShowQRCodePicture

void loginUI::ShowQRCodePicture()
{
	CControlUI* pUI = GetQRCodeUI();
	std::wstring wCodePath = Path::GetCurrentPath();
	wCodePath += L"wxCode.jpg";
	pUI->SetBkImage(wCodePath.c_str());
}
开发者ID:mofa005,项目名称:WebWeixin,代码行数:7,代码来源:loginUI.cpp

示例6: InitWindow

    void CDuiFrameWnd::InitWindow()
{
    CControlUI *btn = m_PaintManager.FindControl(_T("dangerous_HorizontalLayoutUI9"));
    btn->SetVisible(false);
    btn = m_PaintManager.FindControl(_T("window_VerticalLayout"));
    btn->SetBkImage(_T("skin_1.png"));
//    CControlUI *btn = m_PaintManager.FindControl(_T("danerous2_HorizontalLayoutUI10"));

}
开发者ID:fishioon,项目名称:escan,代码行数:9,代码来源:DuiFrameWnd.cpp

示例7: SetBkImage

void CMessageDialog::SetBkImage(CDuiString strBkImage)
{
	CControlUI* background = m_pm.FindControl(kWndBackGround);
	if (background != NULL)
	{
		TCHAR szBuf[MAX_PATH] = {0};
		_stprintf_s(szBuf, MAX_PATH - 1, _T("file='%s' source='0,0,1000,30'"), strBkImage.GetData());
		background->SetBkImage(szBuf);
	}
}
开发者ID:wyrover,项目名称:GDES,代码行数:10,代码来源:MessageDialog.cpp

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

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

示例10: SetBkImage

void CAbout::SetBkImage(LPCTSTR szImageName)
{

	CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
	if (background != NULL)
	{

		background->SetBkImage(szImageName);

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

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

示例12: _updateSearchResultList

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

示例13: OnPrepare

void MainFrame::OnPrepare(TNotifyUI& msg)
{
	CControlUI* background = paint_manager_.FindControl(kBackgroundControlName);
	if (background != NULL)
	{
		TCHAR szBuf[MAX_PATH] = {0};
#if defined(UNDER_WINCE)
		_stprintf(szBuf, _T("file='bg%d.png' corner='600,200,1,1'"), bk_image_index_);
#else
		_stprintf_s(szBuf, MAX_PATH - 1, _T("file='bg%d.png' corner='600,200,1,1'"), bk_image_index_);
#endif
		background->SetBkImage(szBuf);
	}

	UpdateFriendsList();

	UpdateGroupsList();

	UpdateMicroBlogList();
}
开发者ID:fftyjw,项目名称:cdui,代码行数:20,代码来源:main_frame.cpp

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

示例15: ShowMonitInfoList

void CMonitoringUI::ShowMonitInfoList()
{
	CDialogBuilder builder;
	CListContainerElementUI* SubList = (CListContainerElementUI*)(builder.Create(_T("xml//RegInfoList.xml"), (UINT)0, NULL, &m_PaintManager));
	CListUI* pList = dynamic_cast<CListUI*>(m_PaintManager.FindControl(_T("Refer_InfoList")));
	pList->Add(SubList);
	CControlUI* photoUI = dynamic_cast<CControlUI*>(m_PaintManager.FindSubControlByClass(SubList, DUI_CTR_CONTROL));
	CLabelUI* lab_ID = dynamic_cast<CLabelUI*>(m_PaintManager.FindSubControlByClass(SubList, DUI_CTR_LABEL, 1));
	CLabelUI* lab_similarity = dynamic_cast<CLabelUI*>(m_PaintManager.FindSubControlByClass(SubList, DUI_CTR_LABEL, 3));
	CLabelUI* lab_time = dynamic_cast<CLabelUI*>(m_PaintManager.FindSubControlByClass(SubList, DUI_CTR_LABEL, 5));

	std::string strName = std::string(_T("file = 'bmp/test")) + std::to_string(m_nBmp) + std::string(".bmp'");
	photoUI->SetBkImage(strName.c_str());
	lab_ID->SetText(std::to_string(m_testID).c_str());
	lab_similarity->SetText("76%");
	lab_time->SetText("2016-7-29 17:12:55");

	if (m_testID % 3 == 0)
	{
		SubList->SetBkColor(0xFFFFDDDD);
	}
	m_testID++;
}
开发者ID:anyboo,项目名称:FaceIdentifiSystem,代码行数:23,代码来源:MonitoringUI.cpp


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