title: SwitchToThisWindow sends current window to the back
body: <p>So yes, I find myself in the dubious position of implementing a <a href="http://msdn.microsoft.com/en-us/library/ms633553%28VS.85%29.aspx" rel="nofollow"><code>SwitchToThisWindow</code></a> call to force my window to the front. I agree, its not ideal, but its not always possible to argue against product "features" that others deem necessary.</p>
  
  <p>Now, I consider <code>SwitchToThisWindow</code> to be a win over the <a href="http://msdn.microsoft.com/en-us/library/ms681956%28VS.85%29.aspx" rel="nofollow"><code>AttachThreadInput</code></a> hack to do a forced window switch as its less likely to deadlock, and should <code>SwitchToThisWindow</code> be removed, or cease to function I won't complain.</p>
  
  <p>However, <code>SwitchToThisWindow</code> has the unfortunate side effect of pushing the current foreground window to the bottom of the z-order in addition to bringing the target window to the top when FALSE is passed for the fAltTab parameter, and not doing anything if TRUE is passed.</p>
  
  <p>How can I avoid this 'push current active to z-bottom' behavior without resorting to <code>AttachThreadInput</code>?</p>
  
  <p>Alternatively, MS can just remove <code>AttachThreadInput</code> as a viable workaround and I can just tell my manager that the impossible, is in fact, actually, impossible.</p>