quote:
Originally posted by Mnjul
You can't DestroyWindow() another program's window:
quote:
MSDN - DestroyWindow() Function
A thread cannot use DestroyWindow to destroy a window created by a different thread.
Please nicely send WM_CLOSE message to that window and let it decide whether to close or not
Yeah, I saw that when I was looking at the function, but I didn't really think about it
Anyway, it now closes properly. Thanks for your help