本文整理汇总了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;
}
示例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;
}
}
示例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 );
}
}
示例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);
}
示例5: ShowQRCodePicture
void loginUI::ShowQRCodePicture()
{
CControlUI* pUI = GetQRCodeUI();
std::wstring wCodePath = Path::GetCurrentPath();
wCodePath += L"wxCode.jpg";
pUI->SetBkImage(wCodePath.c_str());
}
示例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"));
}
示例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);
}
}
示例8: SetBkColor
void CAbout::SetBkColor(DWORD dwBackColor)
{
CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
if (background != NULL)
{
background->SetBkImage(_T(""));
background->SetBkColor(dwBackColor);
background->NeedUpdate();
}
}
示例9: SetBkColor
void CMessageDialog::SetBkColor(DWORD dwBackColor)
{
CControlUI* background = m_pm.FindControl(kWndBackGround);
if (background != NULL)
{
background->SetBkImage(_T(""));
background->SetBkColor(dwBackColor);
background->NeedUpdate();
}
}
示例10: SetBkImage
void CAbout::SetBkImage(LPCTSTR szImageName)
{
CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
if (background != NULL)
{
background->SetBkImage(szImageName);
}
}
示例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);
}
}
示例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);
}
}
示例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();
}
示例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());
}
示例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++;
}