how can this writen to send back the offset of where this function is sending the commands? a little help please?
Code:
inline void Console(char *cgCmd)
{
HWND MohCons = FindWindow(0, "Console");
EnumChildWindows(MohCons, EnumChildSendCommandProc,
(LPARAM)cgCmd);
}
BOOL CALLBACK EnumChildSendCommandProc(HWND hwnd,LPARAM lParam)
{
char className[1024];
GetClassName(hwnd,className,sizeof(className));
if (strcmp("Edit",className)) return true;
if (ES_READONLY & GetWindowLong(hwnd,GWL_STYLE)) return true;
SendMessage(hwnd,WM_SETTEXT,0,lParam);
SendMessage(hwnd,WM_CHAR,13,0);
return 1;
}