title: Using SendMessage to change the text in the foreground window obtained by GetForegroundWindow changes only the title, not the text inside the window
body: <p>When I am using SendMessage for any process which is found by FindWindowEX then it's working fine and I am able to send text to particular application.</p>
  
  <p>When I am using the GetForegroundWindow to find a window and trying to send text then it's not working. It's setting the title text rather then sending text into window.</p>
  
  <p>could you please help me to resolve it, have a look on below code</p>
  
  <pre><code>//using FindWindowEX  
  Process[] notepads = Process.GetProcessesByName("notepad");  
  FindWindowEx(notepads[0].MainWindowHandle, new IntPtr(0), "Edit", null);
  SendMessage(child, 0x000C, 0, "testing");
  
  //Using GetForegroundwidow  
  IntPtr child = GetForegroundWindow();(0), "Edit", null);  
  SendMessage(child, 0x000C, 0, "testing");
  </code></pre>