查询Microsoft Visual C++ Debug Library窗体并自动点击忽略按钮的小工具代码

来源:互联网 发布:集成指挥平台大数据 编辑:程序博客网 时间:2024/05/21 12:50
procedure TMainForm.TimerTimer(Sender: TObject);var  hWindow, hChild: HWND;begin  hWindow := FindWindow(nil, 'Microsoft Visual C++ Debug Library');  if hWindow <> 0 then  begin    hChild := FindWindowEx(hWindow, 0, nil, '忽略(&I)');    if hChild = 0 then      hChild := FindWindowEx(hWindow, 0, nil, '&Ignore');    if hChild <> 0 then    begin      SendMessage(hChild, WM_LBUTTONDOWN, 0, 0);      SendMessage(hChild, WM_LBUTTONUP, 0, 0);    end;  end;end;

原创粉丝点击