本文整理汇总了C++中CControlUI::GetBkColor方法的典型用法代码示例。如果您正苦于以下问题:C++ CControlUI::GetBkColor方法的具体用法?C++ CControlUI::GetBkColor怎么用?C++ CControlUI::GetBkColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CControlUI
的用法示例。
在下文中一共展示了CControlUI::GetBkColor方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetBkColor
DWORD CMessageDialog::GetBkColor() const
{
CControlUI* background = m_pm.FindControl(kWndBackGround);
if (background != NULL)
return background->GetBkColor();
return 0;
}
示例2: GetBkColor
DWORD CAbout::GetBkColor()
{
CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
if (background != NULL)
return background->GetBkColor();
return 0;
}
示例3: GetBkColor
DWORD MainFrame::GetBkColor()
{
CControlUI* background = paint_manager_.FindControl(kBackgroundControlName);
if (background != NULL)
return background->GetBkColor();
return 0;
}
示例4: 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);
}
}
示例5: Notify
void CColorPicker::Notify(TNotifyUI& msg)
{
if (_tcsicmp(msg.sType, _T("click")) == 0)
{
CControlUI* pOne = static_cast<CControlUI*>(paint_manager_.FindControl(msg.ptMouse));
if (_tcsicmp(pOne->GetClass(), _T("ButtonUI")) == 0)
{
DWORD nColor = pOne->GetBkColor();
CVerticalLayoutUI* pColorContiner = static_cast<CVerticalLayoutUI*>(paint_manager_.FindControl(_T("color")));
pColorContiner->SetBkColor(nColor);
UpdateWindow(m_hWnd);
Sleep(500);
chat_dialog_->SetTextColor(nColor);
}
}
}
示例6: OnItemActivate
void MainFrame::OnItemActivate(TNotifyUI& msg)
{
CTabLayoutUI* pTabControl = static_cast<CTabLayoutUI*>(m_PaintManager.FindControl(kMainTabControlName));
if (pTabControl != NULL)
{
if (pTabControl->GetCurSel() == 0)
{
CFriendsUI* pFriendsList = static_cast<CFriendsUI*>(m_PaintManager.FindControl(kFriendsListControlName));
if ((pFriendsList != NULL) && pFriendsList->GetItemIndex(msg.pSender) != -1)
{
if (_tcsicmp(msg.pSender->GetClass(), _T("ListContainerElementUI")) == 0)
{
Node* node = (Node*)msg.pSender->GetTag();
CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
if (!pFriendsList->CanExpand(node) && (background != NULL))
{
FriendListItemInfo friend_info;
for (std::vector<FriendListItemInfo>::const_iterator citer = friends_.begin(); citer != friends_.end(); ++citer)
{
if (_tcsicmp(citer->id, node->data().value) == 0)
{
friend_info = *citer;
break;
}
}
TCHAR szBuf[MAX_PATH] = { 0 };
if (_tcslen(background->GetBkImage()) > 0)
{
_stprintf_s(szBuf, MAX_PATH - 1, _T("bg%d.png"), bk_image_index_);
}
ChatDialog* pChatDialog = new ChatDialog(szBuf, background->GetBkColor(), myself_info_, friend_info);
if (pChatDialog == NULL)
return;
pChatDialog->Create(NULL, _T("ChatDialog"), UI_WNDSTYLE_FRAME | WS_POPUP, NULL, 0, 0, 0, 0);
skin_changed_observer_.AddReceiver(pChatDialog);
pChatDialog->CenterWindow();
::ShowWindow(*pChatDialog, SW_SHOW);
}
}
}
}
}
}
示例7: OnItemActive
void CRichEditWnd::OnItemActive(TNotifyUI& msg)
{
CAnimationTabLayoutUI* pTabControl = static_cast<CAnimationTabLayoutUI*>(GetPaintMgr()->FindControl(_T("TAB_MAIN")));
if (pTabControl != NULL)
{
if (pTabControl->GetCurSel() == 1)
{
CFriendsUI* pFriendsList = static_cast<CFriendsUI*>(GetPaintMgr()->FindControl(_T("LIST_FRIEND")));
if ((pFriendsList != NULL) && pFriendsList->GetItemIndex(msg.pSender) != -1)
{
if (_tcsicmp(msg.pSender->GetClass(), _T("ListContainerElementUI")) == 0)
{
Node* node = (Node*)msg.pSender->GetTag();
CControlUI* background = GetPaintMgr()->FindControl(_T("bg"));
if (!pFriendsList->CanExpand(node) && (background != NULL))
{
FriendListItemInfo friend_info;
for (std::vector<FriendListItemInfo>::const_iterator citer = friends_.begin(); citer != friends_.end(); ++citer)
{
if (_tcsicmp(citer->id, node->data().value) == 0)
{
friend_info = *citer;
break;
}
}
ChatDialog* pChatDialog = new ChatDialog(background->GetBkImage(), background->GetBkColor(), myself_info_, friend_info);
if (pChatDialog == NULL)
return;
#if defined(WIN32) && !defined(UNDER_CE)
pChatDialog->Create(NULL, _T("ChatDialog"), UI_WNDSTYLE_FRAME | WS_POPUP, NULL, 0, 0, 0, 0);
#else
pChatDialog->Create(NULL, _T("ChatDialog"), UI_WNDSTYLE_FRAME | WS_POPUP, NULL, 0, 0, 0, 0);
#endif
pChatDialog->CenterWindow();
::ShowWindow(*pChatDialog, SW_SHOW);
}
}
}
}
}
}
示例8: Notify
//.........这里部分代码省略.........
}
}
else if (_tcsicmp(msg.pSender->GetName(), kSearchEditTipControlName) == 0)
{
msg.pSender->SetVisible(false);
CRichEditUI* search_edit = static_cast<CRichEditUI*>(paint_manager_.FindControl(kSearchEditControlName));
if (search_edit != NULL)
{
search_edit->SetText(msg.pSender->GetText());
search_edit->SetVisible(true);
}
}
else if (_tcsicmp(msg.pSender->GetName(), kChangeBkSkinControlName) == 0)
{
CControlUI* background = paint_manager_.FindControl(kBackgroundControlName);
if (background != NULL)
{
TCHAR szBuf[MAX_PATH] = {0};
++bk_image_index_;
if (kBackgroundSkinImageCount < bk_image_index_)
bk_image_index_ = 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);
SkinChangedParam param;
CControlUI* background = paint_manager_.FindControl(kBackgroundControlName);
if (background != NULL)
{
param.bkcolor = background->GetBkColor();
if (_tcslen(background->GetBkImage()) > 0)
{
#if defined(UNDER_WINCE)
_stprintf(szBuf, _T("bg%d.png"), bk_image_index_);
#else
_stprintf_s(szBuf, MAX_PATH - 1, _T("bg%d.png"), bk_image_index_);
#endif
}
param.bgimage = szBuf;
}
skin_changed_observer_.Broadcast(param);
}
}
else if (_tcsicmp(msg.pSender->GetName(), kChangeColorSkinControlName) == 0)
{
CDuiRect rcWindow;
GetWindowRect(m_hWnd, &rcWindow);
rcWindow.top = rcWindow.top + msg.pSender->GetPos().bottom;
new ColorSkinWindow(this, rcWindow);
}
}
else if (_tcsicmp(msg.sType, _T("timer")) == 0)
{
return OnTimer(msg);
}
else if (_tcsicmp(msg.sType, _T("selectchanged")) == 0)
{
CTabLayoutUI* pTabControl = static_cast<CTabLayoutUI*>(paint_manager_.FindControl(kTabControlName));
if (_tcsicmp(msg.pSender->GetName(), kFriendButtonControlName) == 0)
{
if (pTabControl && pTabControl->GetCurSel() != 0)
示例9: OnClick
void MainFrame::OnClick(TNotifyUI& msg)
{
WindowImplBase::OnClick(msg);
if (_tcsicmp(msg.pSender->GetName(), kHideLeftMainPannelControlName) == 0)
{
CControlUI* left_main_pannel = m_PaintManager.FindControl(kLeftMainPannelControlName);
CControlUI* hide_left_main_pannel = m_PaintManager.FindControl(kHideLeftMainPannelControlName);
CControlUI* show_left_main_pannel = m_PaintManager.FindControl(kShowLeftMainPannelControlName);
if ((left_main_pannel != NULL) && (show_left_main_pannel != NULL) && (hide_left_main_pannel != NULL))
{
hide_left_main_pannel->SetVisible(false);
left_main_pannel->SetVisible(false);
show_left_main_pannel->SetVisible(true);
}
}
else if (_tcsicmp(msg.pSender->GetName(), kShowLeftMainPannelControlName) == 0)
{
CControlUI* left_main_pannel = m_PaintManager.FindControl(kLeftMainPannelControlName);
CControlUI* hide_left_main_pannel = m_PaintManager.FindControl(kHideLeftMainPannelControlName);
CControlUI* show_left_main_pannel = m_PaintManager.FindControl(kShowLeftMainPannelControlName);
if ((left_main_pannel != NULL) && (show_left_main_pannel != NULL) && (hide_left_main_pannel != NULL))
{
hide_left_main_pannel->SetVisible(true);
left_main_pannel->SetVisible(true);
show_left_main_pannel->SetVisible(false);
}
}
else if (_tcsicmp(msg.pSender->GetName(), kSignatureTipsControlName) == 0)
{
msg.pSender->SetVisible(false);
CEditUI* signature = static_cast<CEditUI*>(m_PaintManager.FindControl(kSignatureControlName));
if (signature != NULL)
{
signature->SetText(msg.pSender->GetText());
signature->SetVisible(true);
}
}
else if (_tcsicmp(msg.pSender->GetName(), kSearchEditTipControlName) == 0)
{
msg.pSender->SetVisible(false);
CEditUI* search_edit = static_cast<CEditUI*>(m_PaintManager.FindControl(kSearchEditControlName));
if (search_edit != NULL)
{
search_edit->SetText(msg.pSender->GetText());
search_edit->SetVisible(true);
}
}
else if (_tcsicmp(msg.pSender->GetName(), kChangeBkSkinControlName) == 0)
{
CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
if (background != NULL)
{
TCHAR szBuf[MAX_PATH] = { 0 };
++bk_image_index_;
if (kBackgroundSkinImageCount < bk_image_index_)
bk_image_index_ = 0;
_stprintf_s(szBuf, MAX_PATH - 1, _T("file='bg%d.png' corner='600,200,1,1'"), bk_image_index_);
background->SetBkImage(szBuf);
SkinChangedParam param;
CControlUI* background = m_PaintManager.FindControl(kBackgroundControlName);
if (background != NULL)
{
param.bkcolor = background->GetBkColor();
if (_tcslen(background->GetBkImage()) > 0)
{
_stprintf_s(szBuf, MAX_PATH - 1, _T("bg%d.png"), bk_image_index_);
}
param.bgimage = szBuf;
}
skin_changed_observer_.Broadcast(param);
}
}
else if (_tcsicmp(msg.pSender->GetName(), kChangeColorSkinControlName) == 0)
{
CDuiRect rcWindow;
GetWindowRect(m_hWnd, &rcWindow);
rcWindow.top = rcWindow.top + msg.pSender->GetPos().bottom;
new ColorSkinWindow(this, rcWindow);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("phone")))
{
logic::GetLogic()->asynNotifyObserver(module::KEY_LOGIN_USERID,10);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("QQpalycenter")))
{
logic::GetLogic()->removeObserver(this);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("MainMenu")))
{
CMenuWnd* pMenu = new CMenuWnd(m_hWnd);
DuiLib::CPoint point = msg.ptMouse;
ClientToScreen(m_hWnd, &point);
STRINGorID xml(_T("menutest.xml"));
pMenu->Init(NULL, xml, _T("xml"), point);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("ToolsBtn")))//设置按钮
//.........这里部分代码省略.........