title: Can a message-only window receive WM_QUERYENDSESSION?
body: <p>In the debug version of the program, I create a visible window, and the <code>WM_QUERYENDSESSION</code> message is received by its <code>WNDPROC</code>. In the release version, the window is supposed to be message-only, so I specify <code>HWND_MESSAGE</code> as the <code>hWndParent</code> when calling <code>CreateWindowEx()</code>. Unfortunately, I then don't receive the <code>WM_QUERYENDSESSION</code> message anymore.</p>
  <p>Is <code>WM_QUERYENDSESSION</code> one of those broadcast messages <a href="https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#message-only-windows" rel="nofollow noreferrer">mentioned here</a>?</p>
  <blockquote>
  <p>A message-only window [...] does not receive broadcast messages.</p>
  </blockquote>