Текущий архив: 2003.07.17;
Скачать: CL | DM;
ВнизВ чате просили исходник... Найти похожие ветки
← →
Morfey (2003-06-28 03:11) [0]unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Timer1: TTimer;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
GroupBox1: TGroupBox;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
msg: TComboBox;
Button4: TButton;
lparam1: TEdit;
rparam1: TEdit;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Label3MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure Label3MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
dddddd:hwnd;
hwndII:THandle;
fikxed: boolean;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
pcharr:PChar;
P: TPoint;
HWND: THandle;
WndClass : array [0..255] of Char;
begin
GetCursorPos(P);
HWND := WindowFromPoint(P);
GetClassName(HWND, WndClass, SizeOf(WndClass));
label1.Caption:="ClassName - "+WndClass;
Label2.Caption:="HWND of item under cursor - "+IntToStr(hwnd);
GetWindowText(hwnd,Pcharr,32);
Label6.Caption:="Название - "+pcharr;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Button1.Click;
end;
procedure TForm1.Label3MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
P: TPoint;
HWND: THandle;
WndClass : array [0..255] of Char;
begin
if shift=[ssleft] then begin fikxed:=true;
color:=clred; end;
end;
procedure TForm1.Label3MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
P: TPoint;
HWND: THandle;
WndClass : array [0..255] of Char;
begin
if fikxed then begin
GetCursorPos(P);
HWND := WindowFromPoint(P);
GetClassName(HWND, WndClass, SizeOf(WndClass));
label4.Caption:="ClassName - "+WndClass;
Label5.Caption:="HWND of sel item - "+IntToStr(hwnd);
Label5.Hint:=IntToStr(hwnd);
label7.Caption:="Название - "+Label6.Caption;
dddddd:=hwnd;
fikxed:=false;
color:=clBtnFace;
end; end;
procedure TForm1.Button2Click(Sender: TObject);
begin
SendMessage(dddddd,WM_DESTROY,1,1);
end;
procedure TForm1.Button4Click(Sender: TObject);
var y:integer;
begin
if msg.Text="close" then begin
SendMessage(dddddd,WM_close,strtoint(lparam1.text),strtoint(rparam1.text));
end;
if msg.Text="destroy" then begin
SendMessage(dddddd,WM_destroy,strtoint(lparam1.text),strtoint(rparam1.text));
end;
if msg.Text="settext" then begin
SendMessage(dddddd,WM_settext,strtoint(lparam1.text),LParam(rparam1.text));
end;
end;
end.
← →
MetalFan (2003-06-30 09:35) [1]что такое? антиресно)
Страницы: 1 вся ветка
Текущий архив: 2003.07.17;
Скачать: CL | DM;
Память: 0.45 MB
Время: 0.009 c