title: Window do not accept key press after ShowWindow(browserPtr, 3)
body: <p>My goal is to dock browser window from another process
  into my application. </p>
  
  <p>I have a panel hwnd that will be a parent, and hwnd of browser window. </p>
  
  <p>Here is a code: </p>
  
  <pre><code>ShowWindow(browserPtr, 3);
  SetParent(browserPtr, browserContainerPanel.Handle);
  MoveWindow(browserPtr, 0, 0, browserContainerPanel.Width, browserContainerPanel.Height, true);
  </code></pre>
  
  <p>In this case browser window became a child, and placed correctly. 
  But it stopped accepting keyboard input and cannot gather the focus. </p>
  
  <p>If I don't call ShowWindow - all works correctly except window position and size. 
  Wihout ShowWindow I cannot set size and position. MoveWindow just ignored. </p>
  
  <p>Why docked window do not accepts user input?
  What I am doing wrong?</p>
  
  <p>UPDATE</p>
  
  <p>Current My code:</p>
  
  <pre><code>/// Attach container app input thread to the running app input thread, so that
  ///  the running app receives user input.
  FAppThreadID = GetWindowThreadProcessId(window, new IntPtr());
  AttachThreadInput(GetCurrentThreadId(), FAppThreadID, true);
  
  /// Changing parent of the running app to our provided container control
  SetParent(window, container);
  SendMessage(container, WM_UPDATEUISTATE, UIS_INITIALIZE, 0);
  UpdateWindow(window);
  
  /// Make the running app to fill all the client area of the container
  SetWindowPos(window, 0, 0, 0, 1000, 1000, SWP_NOZORDER);
  SetForegroundWindow(window);
  </code></pre>
  
  <p>But in this case window size is ignored for some reason. However there is everything ok with focus and input. How to fix sizes?</p>