title: EnableWindow(hWnd, false) doesn't disable keyboard input
body: <p>I am attempting to disable a window under certain conditions using <code>EnableWindow(hWnd, false);</code></p>
  
  <p>According to <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms646291.aspx" rel="nofollow noreferrer">the documentation</a>, this should "disable mouse and keyboard input to the specified window".</p>
  
  <p>The problem I am seeing is that it does, in fact, disable like it says, except if the cursor is currently inside of a text box in the window and the window has the focus that does not get disabled. I was thinking of doing some sort of code to take the focus off of the window as well.</p>
  
  <p>Is there a better way to go about this?</p>
  
  <p>Note: The window being disabled is a binary ran via <code>_spawnl()</code>.</p>