Something you could consider doing, is to implement a regular checking mechanism. The child process would check if the HWND of its parent is a valid HWND. You could set a timer that fired as often as required.
You could use something like the following:
case WM_TIMER:
{
UINT_PTR wTimerId = wParam;
switch (wTimerId)
{
case checkIfParentAliveTimerId:
{
HWND parent = GetParent(hwnd);
if (IsWindow(parent) == false)
{
}
}
break;
}
}
return 0;