I am trying to send text to a telnet window without using sendkeys.send().

I am new to API but not new to programming and I am using C#.


I figured out how to get the hWnd of the telnet session but I cannot figure out how to send text to the window. Heres what I have so far.

SendMessage(hWndTnet, WM_SETTEXT, 0, "testing");
SendMessage(hWndTnet, WM_CHAR, 13, null);

What am I doing wrong?


Thanks a bunch for any help