inteface the windows api and use sendmessage
something like;
Hwnd Hwnd;
Hwnd = findwindow (notepad, Classnamenotepad
THen you get the children , i forget, enum children or then use findwindowEx to ge tthe editbox
hw = findwindowEx(hwnd, editboxclass)
then sendmessage(hw , "text'. CONST_FOR_WRITING);
just google "sendmessage notepad example"