Is it possible to handle in Irrlicht (Win32) application WM_USER messages sent from another process to "embedded" Irrlicht window ?
PostMessage(hwnd, WM_USER..) call from the same Irrlicht application works ok and generates EET_USER_EVENT as expected ... however PostMessage from another application seems like just ignored in
It shouldn't matter whether the message is internal or external, provided you're passing it using the right HWND. Are you sure the problem isn't elsewhere?
slavik262 wrote:It shouldn't matter whether the message is internal or external, provided you're passing it using the right HWND. Are you sure the problem isn't elsewhere?
Well, yes, (it seems like ) I'm sure it's ok with HWND and inter-process messages - because PostMessage from Irrlicht to another application works too ...
Now I'm trying to figure out if soemthing can be done with CIrrDeviceWin32.cpp:
//! runs the device. Returns false if device wants to be deleted
bool CIrrDeviceWin32::run()
{
os::Timer::tick();
MSG msg;
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
// No message translation because we don't use WM_CHAR and it would conflict with our
// deadkey handling.
if (ExternalWindow && msg.hwnd == HWnd)
WndProc(HWnd, msg.message, msg.wParam, msg.lParam);
else
DispatchMessage(&msg);
if (msg.message == WM_QUIT)
Close = true;
}
if (!Close)
resizeIfNecessary();
if(!Close)
pollJoysticks();
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
return !Close;
}