Another problem arises =(
Code:
void CProcess::SendText()
{
HWND hWnd;
hWnd = FindWindow(0, "Nexus");
ShowWindow(hWnd, SW_SHOW);
SetForegroundWindow(hWnd);
Delay(10000); //in milliseconds
char szText[]="hello world";
SendMessage(hWnd, WM_SETTEXT, 0, szText);
return;
}
It's telling me I have to cast szText.. When I do that I get no errors, but nothing displays in hWnd (Nexus)...
Code:
--------------------Configuration: Macro - Win32 Debug--------------------
Compiling...
Main.cpp
c:\program files\microsoft visual studio\myprojects\macro\apis.h(141) : error C2664: 'SendMessageA' : cannot convert parameter 4 from 'char [12]' to 'long'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Error executing cl.exe.
Main.obj - 1 error(s), 0 warning(s)
Thanks for all your help. You've been my idol for the past few hours hehe.