title: Win32: How to hide 3rd party windows in taskbar by hWnd
body: <p>I have to hide popup windows in third party library. </p>
  
  <p>I have implemented windows hook stuff with <a href="http://msdn.microsoft.com/en-us/library/ms644990%28VS.85%29.aspx" rel="noreferrer">SetWindowsHookEx</a> and know all the newely created hWnd(s). I listen to <code>HSHELL_WINDOWCREATED</code> callback and do the following: </p>
  
  <pre><code>long style= GetWindowLong(hWnd, GWL_STYLE);
  style &amp;= ~(WS_VISIBLE);    // this works - window become invisible 
  
  style |= WS_EX_TOOLWINDOW;   // flags don't work - windows remains in taskbar
  style &amp;= ~(WS_EX_APPWINDOW); 
  
  SetWindowLong(hWnd, GWL_STYLE, style);      
  </code></pre>
  
  <p>What I do wrong here to hide newely created windows in task bar? </p>