找到一个软件上有两个"Button"窗口类名,我想按第二个"Button",但是怎么样写都是按第一个"Button".var
h1,h2:thandle;
begin
h1:=findwindow('#32770','NT);
if h1=0 then exit;
h2:= findwindowex(h1,0,'Button',nil);
if h2=0 then exit;
postmessage(h2,wm_keydown,vk_return,0);
end;请问要怎么样才行?就算改了窗口句柄也不行..