I'm trying a new thing here.
I'm trying to get user input from console and send the data to notepad.
That part is done

Now, I'm making a method which using x and y coordinates of the edit control, will write the data...
any ideas how?
Right now, I'm using this:
GeSHi (cpp):
#include <windows.h>
#include <iostream>
using std::cout;
using std::endl;
class ToNotepad
{
private:
HWND m_hNotepad;
public:
ToNotepad()
{
m_hNotepad = FindWindow (TEXT("Notepad"), NULL);
}
bool IsGood() const
{
return IsWindow (m_hNotepad) ? true : false;
}
void SendString (const TCHAR* data, int const x = 0, int const y = 0)
{
HWND m_hEditor = FindWindowEx(m_hNotepad, NULL, TEXT("Edit"), NULL);
SendMessage (m_hEditor, WM_SETTEXT, NULL, reinterpret_cast<LPARAM>(data));
}
protected:
};
int main()
{
ToNotepad *pnp = new ToNotepad;
if (pnp->IsGood())
{
cout << "Notepad located..." << endl;
pnp->SendString(TEXT("Hola mundo"));
}
else
{
cout << "Notepad is not running..." << endl;
}
delete pnp;
return 0;
}
Created by GeSHI 1.0.7.18