title: How can I make a child process window to appear modal in my process?
body: <p>I have an application that calls some other utility application to set some settings for a particular device. That utility application is called using ShellExecuteEx.</p>
  
  <p>So as not to confuse the user, it would be better to made the window of the utility application modal to my main window. How does one do this?</p>
  
  <p>Things I've tried:</p>
  
  <ol>
  <li>WaitForSingleObjectEx on the process after ShellExecuteEx, INFINITE TIMEOUT - window is modal, but main application does not repaint (because it's waiting for the single object!)</li>
  <li>WaitForSingleObjectEx on the process after ShellExecuteEx, some small timeout, then call Peekmessage and DispatchMessage - repaint now works, but utility application is no longer "modal". The main application responds to mouse clicks, button clicks, etc</li>
  <li>EnableWindow(FALSE), then do method #2, then EnableWindow(TRUE) - WORKS!!!, but after this, the z-order of my application changed. (it's now below some other window). why?!</li>
  </ol>