delphi给X64DBG命令行处发送消息失败
unit Unit1;interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
a, b: PAnsiChar;
h: HWND;
begin
h := FindWindow(nil, 'x64dbg');
h := FindWindowEx(h, 0, 'Qt5QWindowIcon1', nil);
SendMessage(h, WM_SETTEXT, 255, Integer(PChar('我来测了')));
end;
end.
试试if h<>0 then 深蓝7788 发表于 2019-7-1 14:04
试试if h0 then
网上说 Qt程序好像只有一个id参数,所以无法发送到控件上 分享精神,是最值得尊敬的!
页:
[1]