0

I am having trouble with a program that I am writing. I cannot seem to be able to destroy a window. I know the DestroyWindow function but it only works on windows that my application owns. Is there any way to destroy a window that is not owned by my application using windows API? (I was thinking of maybe writing some kind of keysym function that would press ALT-TAB then check the window name, then press ALT-F4 if necessary)

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Labdabeta
0

SendMessage(FindWindow("WindowClass", "windowname"), WM_CLOSE, 0);

Or PostMessage which does not wait to return.

Edited by triumphost: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.