title: How to remove WS_EX_TOPMOST style from window?
body: <p>I try to create Window for video by using following syntax:</p>
  
  <pre><code>hwnd=CreateWindow("Video Window", "Video window", 
                      WS_OVERLAPPEDWINDOW | WS_VISIBLE,
          CW_USEDEFAULT, CW_USEDEFAULT, rect.right-rect.left,rect.bottom-rect.top,        NULL, NULL, hInstance, NULL);
  </code></pre>
  
  <p>All works as expected but the issue is that the window always on top. It means that I see this window even if I switch to other application.</p>
  
  <p>From <code>Window directive</code> program I found additional style: <code>WS_EX_TOPMOST</code></p>
  
  <p><img src="https://i.stack.imgur.com/2kOZI.png" alt="enter image description here"></p>
  
  <p>How can I remove It programmatically or do I need override it somehow?</p>
  
  <p>I tried <code>SetWindowPos</code>:</p>
  
  <pre><code>SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
  </code></pre>
  
  <p>or to use instead <code>CreateWindow</code> at <code>CreateWindowEx</code>:</p>
  
  <pre><code>hwnd=CreateWindowEx(WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR | WS_EX_WINDOWEDGE,
                      "Video Window","Video Window",
                      WS_OVERLAPPEDWINDOW  | WS_VISIBLE ,
                      CW_USEDEFAULT,
                      CW_USEDEFAULT,
                      rect.right-rect.left,
                      rect.bottom-rect.top,
                      NULL,
                      NULL,
                      hInstance,
                      NULL);
  </code></pre>
  
  <p>but still get flag <code>WS_EX_TOPMOST</code></p>
  
  <p>Thanks,</p>