title: WinApi - change Window Style
body: <p>I want to change my windo style during runtime. I use this code</p>
  
  <pre><code>if (this-&gt;fullscreen)
  {
      this-&gt;style = WS_POPUP|WS_VISIBLE;
  }
  else 
  {
      this-&gt;style = WS_OVERLAPPED|WS_SYSMENU|WS_VISIBLE;
  }
  
      SetWindowLongPtr(this-&gt;mainWindowHandle, GWL_STYLE, this-&gt;style);
  
          SetWindowPos(this-&gt;mainWindowHandle, 
                  HWND_TOP, 
                  0, 
                  0,
                  0,    //New Width
                  0, //New Height, 
              SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
  </code></pre>
  
  <p>But it has no effect... and window is still without border (WS_POPUP)...</p>