title: Close window that ignores WM_CLOSE?
body: <p>I would like to close some application's windows from my app. I've tried to send <code>WM_CLOSE</code> message to that window (and it works perfectly for some windows), but some windows ignore <code>WM_CLOSE</code>. Then I've found <a href="https://msdn.microsoft.com/ru-ru/library/windows/desktop/ff381396(v=vs.85).aspx" rel="nofollow noreferrer">this</a> article that says that if I want to close window, I could call <code>DestroyWindow</code> WINAPI function. But, according to <a href="https://msdn.microsoft.com/ru-ru/library/windows/desktop/ms632682(v=vs.85).aspx" rel="nofollow noreferrer">documentation</a>, &quot;A thread cannot use <code>DestroyWindow</code> to destroy a window created by a different thread&quot;. So I can not use it from my app to close another app's window.</p>
  <p>So my question is - is it possible to close application window, that ignores <code>WM_CLOSE</code> message? I do want exactly to close window (for example popup window), not to quit application, not to close thread related to that window and so on.</p>
  <p><strong>EDIT</strong>:
  I know for sure, that window intentionally ignores my <code>WM_CLOSE</code>, as I see through spy++ that it receives my <code>WM_CLOSE</code> message. And I do not want to implement &quot;clicking top right corner [X] button&quot;, as I want unified solution (the window with taht I have an issue does not have button [X] at all).</p>