title: How can you tell if SendMessage() was successful (message was delivered)?
body: <p>is it possible to determine if a SendMessage() call was successful and delivered my message to the target window?</p>
  
  <p>The SendMessage() description in the Windows API seems quiet on this and only says the following:</p>
  
  <blockquote>
    <p>The return value specifies the result of the message processing; it depends on the message sent.</p>
  </blockquote>
  
  <p>This obviously refers to the fact that the return code reflects the value returned by the wndproc of the target window. </p>
  
  <p>But what will the return code be if the message wasn't delivered at all (e.g. due to access control, or due to the window having been destoroyed in the meantime)? How can I detect such situations?</p>