How to Activate/Deactivate Noesis View if the hosting window is a child window
Posted: 04 Jul 2019, 09:33
Hi,
Inside Win32Display.cpp, the code to activate/deactivate Noesis' View is by hooking into WM_ACTIVATE message.
However, this message is not sent if the window is a child window (not Top-level window).
What is the recommended way to write the integration layer when the hosting window is a child window ?
Inside Win32Display.cpp, the code to activate/deactivate Noesis' View is by hooking into WM_ACTIVATE message.
However, this message is not sent if the window is a child window (not Top-level window).
Code: Select all
case WM_ACTIVATE:
{
switch (LOWORD(wParam))
{
case WA_INACTIVE:
{
mDeactivated(this);
TSF::DeactivateWindow(mWindowHandle);
break;
}
default:
{
TSF::ActivateWindow(mWindowHandle);
mActivated(this);
// Sync key states (they are reset each time window is deactivated)
for (uint32_t i = 0; i < NS_COUNTOF(mKeyTable); i++)
{
if (mKeyTable[i] != 0 && GetAsyncKeyState(i))
{
mKeyDown(this, (Key)mKeyTable[i]);
}
}
break;
}
}
return false;
}