Windows console application which gracefully closes other application by sending close message (WM_CLOSE) to its window