Im trying to send text to the place where you type messages in an msn conversation but i cant seem to do it.
{
char buffer[MAX_PATH];
char *message = "hello";
sprintf(buffer, "%s", message);
GetWindowText(hwContact, szContact, 256);
strcpy(&szContact[strlen(szContact)], " - Conversation");
//GetWindowText(hwMsg, szMsg, 256);
//strcpy(&szMsg[strlen(szMsg)], "");
HWND fcContact = FindWindow(NULL, szContact);
ShowWindow(fcContact, SW_SHOWMAXIMIZED);
SetForegroundWindow(fcContact);
Sleep(5000);
SendMessage(NULL, WM_SETTEXT, 0, (LPARAM)buffer);
break;
}
If i change
SendMessage(NULL, WM_SETTEXT, 0, (LPARAM)buffer);
to
SendMessage(fcContact, WM_SETTEXT, 0, (LPARAM)buffer);
it changes the name of the window because fcContact is the windows handle, but how do i get the handle of the section where you type the messages in msn.
I hope im kinda clear on this :(