本文整理汇总了C++中CGUIWindow::GetControl方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIWindow::GetControl方法的具体用法?C++ CGUIWindow::GetControl怎么用?C++ CGUIWindow::GetControl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIWindow
的用法示例。
在下文中一共展示了CGUIWindow::GetControl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessMessage
//.........这里部分代码省略.........
case TMSG_LOAD_LANG_INFO:
{
pMsg->dwParam1 = g_langInfo.Load(pMsg->strParam);
break;
}
break;
case TMSG_DELETE_BG_LOADER:
{
CBackgroundInfoLoader *pLoader = (CBackgroundInfoLoader *)pMsg->lpVoid;
if (pLoader)
delete pLoader;
}
break;
case TMSG_GENERAL_MESSAGE:
{
CGUIMessage *msg = (CGUIMessage *)pMsg->lpVoid;
if (msg)
{
CGUIWindow* pWindow = g_windowManager.GetWindow(pMsg->dwParam1);
if (pWindow)
pWindow->OnMessage(*msg);
if (!pMsg->hWaitEvent) // no one waits for this message to return.
delete msg;
}
}
break;
case TMSG_SET_CONTROL_LABEL:
{
CGUIWindow* pWindow = g_windowManager.GetWindow(pMsg->dwParam1);
if (pWindow)
{
CGUIControl *control = (CGUIControl *)pWindow->GetControl(pMsg->dwParam2);
if (control)
{
CGUIMessage msg(GUI_MSG_LABEL_SET, pMsg->dwParam1, pMsg->dwParam2);
msg.SetLabel(pMsg->strParam);
control->OnMessage(msg);
}
}
}
break;
case TMSG_CLOSE_DIALOG:
{
CGUIDialog *dlg = (CGUIDialog *)pMsg->lpVoid;
bool bForce = (bool)pMsg->dwParam1;
if (dlg)
dlg->Close(bForce);
}
break;
case TMSG_PREVIOUS_WINDOW:
{
g_windowManager.PreviousWindow();
}
break;
case TMSG_TOGGLEFULLSCREEN:
{
CAction action;
action.id = ACTION_TOGGLE_FULLSCREEN;
g_application.OnAction(action);
}