F
fgh001
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
var
hh,hh1:hwnd;
a:integer;
begin
winexec('C:/HERO2000/SthSVCD.exe',sw_show);
hh:=FindWindow('SthVCDClass','豪杰超级解霸2000');
///查找超级解霸
if hh<>0 then
begin
postmessage(hh,WM_COMMAND,40001,0);
hh1:=FindWindowEx(FindWindow('#32770','打开影视文件'),0,'Edit',nil);///得到编辑筐
//hh1始终为0
//得不到编辑框的句柄,不知是FindWindowEx函数的参数写错了还是别的问题??
sendMessage(hh1,WM_SETTEXT,0,LongInt(pchar('e:/movie/1.DAT')));//添加字符
sendMessage(FindWindow('#32770','打开影视文件'),WM_COMMAND,IDOK,0);
sendMessage(hh,WM_COMMAND,40003,0);
end
else
showmessage('not find sthsvcd!!');
end;
var
hh,hh1:hwnd;
a:integer;
begin
winexec('C:/HERO2000/SthSVCD.exe',sw_show);
hh:=FindWindow('SthVCDClass','豪杰超级解霸2000');
///查找超级解霸
if hh<>0 then
begin
postmessage(hh,WM_COMMAND,40001,0);
hh1:=FindWindowEx(FindWindow('#32770','打开影视文件'),0,'Edit',nil);///得到编辑筐
//hh1始终为0
//得不到编辑框的句柄,不知是FindWindowEx函数的参数写错了还是别的问题??
sendMessage(hh1,WM_SETTEXT,0,LongInt(pchar('e:/movie/1.DAT')));//添加字符
sendMessage(FindWindow('#32770','打开影视文件'),WM_COMMAND,IDOK,0);
sendMessage(hh,WM_COMMAND,40003,0);
end
else
showmessage('not find sthsvcd!!');
end;