The application and anything else freezes, if i click the close button by my own MOUSEEVENTF_LEFTDOWN/UP.
I'm blocking WM_LBUTTONDOWN/ UP by a mouse hook to forward my own injected input. I can click everything (buttons, listview items) except the close button.
If it freezes and i open the task manager, the window closes immediately and the WM_CLOSE gets executed, the same in Debug and Release mode.
I avoid injected input in the hook:
if (MSLLHOOKSTRUCT* pMouseStruct = (MSLLHOOKSTRUCT*)lParam; nCode >= 0 && (pMouseStruct->flags & LLMHF_INJECTED) == 0)
It seems, as if the close button doesn't accept injected input.
What could be the solution here?