本文整理汇总了C++中CEditUI::SetVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ CEditUI::SetVisible方法的具体用法?C++ CEditUI::SetVisible怎么用?C++ CEditUI::SetVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEditUI
的用法示例。
在下文中一共展示了CEditUI::SetVisible方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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")))//设置按钮
//.........这里部分代码省略.........