本文整理汇总了C++中HostWindow::onMessageReceived方法的典型用法代码示例。如果您正苦于以下问题:C++ HostWindow::onMessageReceived方法的具体用法?C++ HostWindow::onMessageReceived怎么用?C++ HostWindow::onMessageReceived使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HostWindow
的用法示例。
在下文中一共展示了HostWindow::onMessageReceived方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onMessageReceived
void IpcClientHost::onMessageReceived(const PIpcMessage& msg)
{
if (msg.routing_id() != MSG_ROUTING_CONTROL) {
// ROUTED MESSAGE, forward it to the correct host window
HostWindow* win = static_cast<HostWindow*>(findWindow(msg.routing_id()));
if (!win) {
return;
}
win->onMessageReceived(msg);
} else {
// CONTROL MESSAGE, Handle it here
bool msgIsOk;
IPC_BEGIN_MESSAGE_MAP(IpcClientHost, msg, msgIsOk)
IPC_MESSAGE_HANDLER(View_Host_ReturnedKeyEvent, onReturnedInputEvent)
IPC_MESSAGE_HANDLER(ViewHost_PrepareAddWindow, onPrepareAddWindow)
IPC_MESSAGE_HANDLER(ViewHost_AddWindow, onAddWindow)
IPC_MESSAGE_HANDLER(ViewHost_RemoveWindow, onRemoveWindow)
IPC_MESSAGE_HANDLER(ViewHost_SetWindowProperties, onSetWindowProperties)
IPC_MESSAGE_HANDLER(ViewHost_FocusWindow, onFocusWindow)
IPC_MESSAGE_HANDLER(ViewHost_UnfocusWindow, onUnfocusWindow)
IPC_MESSAGE_UNHANDLED( g_critical("%s (%d). IPC Message Not Handled: (0x%x : 0x%x : 0x%x)",
__PRETTY_FUNCTION__, __LINE__, msg.routing_id(), msg.type(), msg.message_id()));
IPC_END_MESSAGE_MAP()
}
}