title: WS_MINIMIZE flag added by itself
body: <p>I am experiencing a very bizarre bug with creating window on Windows OS.<br>
  I am creating window with following part of code.
  This window is a plugin in another application, so I creating a window as a child inside window provided by other application.</p>
  
  <pre><code>newWindow = ::CreateWindow("SomeName",
      "",
      WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_CHILD | WS_VISIBLE,
      in_create_options._location.m_x,
      in_create_options._location.m_y,
      in_create_options._size.m_x,
      in_create_options._size.m_y,
      (HWND)in_create_options._parent,
      0,
      0,
      newView);
  </code></pre>
  
  <p>But when the window is activated it also has WS_MINIMIZE flag, therefore activated minimized. The problem is, it only happens in RELEASE mode, therefore I can not debug it.<br>
  What I want to ask is - does someone know what may cause this?<br>
  In addition, is there any way I can check and update windows flags before activate it?</p>
  
  <p>P.S. I tried this code:</p>
  
  <pre><code>WINDOWINFO currentWindowInfo;
  ::GetWindowInfo(((WCPluginViewWin *)in_view)-&gt;m_nativeView, &amp;currentWindowInfo);
  if (currentWindowInfo.dwStyle &amp; WS_MINIMIZE)
  {
      currentWindowInfo.dwStyle &amp;= ~WS_MINIMIZE;
      ::AdjustWindowRect(&amp;currentWindowInfo.rcClient, 
  }
  ::ShowWindowAsync(((WCPluginViewWin *)in_view)-&gt;m_nativeView, SW_SHOW);
  </code></pre>
  
  <p>but it still does not work. Window still opens with WS_MINIMIZE flag.
  Is there something else instead AdjustWindowRect?</p>