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