![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Не обновляется Msg.hwnd [D7, WinXP]
morik © (2005-12-23 23:44:00)procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnMessage := AppMessage;
end;
---------------------
private
procedure AppMessage(var Msg: TMsg; var Handled: Boolean);
-------------
procedure TForm1.AppMessage(var Msg: TMsg; var Handled: Boolean);
var
i: integer;
begin
If msg.message = WM_LBUTTONDOWN then
for i:= 0 to Form1.ControlCount - 1 do begin
if Form1.Components[i] is TWinControl then
if TWinControl(Form1.Components[i]).Handle = msg.hwnd then
ShowMessage(TWinControl(Form1.Components[i]).Name);
end;
end;
На ShowMessage(TWinControl(Form1.Components[i]).Name);показует всегда имья контрола на котором первым кликнул.
Почему не обновляется msg.hwnd?
GanibalLector (2005-12-24 01:09:00) [1]
if TWinControl(Form1.Components[i]).Handle = msg.hwnd then
begin
Handled:=True;
ShowMessage(TWinControl(Form1.Components[i]).Name);
end;