Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.03.19;
Скачать: CL | DM;

Вниз

Не обновляется Msg.hwnd   Найти похожие ветки 

 
morik ©   (2005-12-23 23:44) [0]

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) [1]


if TWinControl(Form1.Components[i]).Handle = msg.hwnd then
     begin
       Handled:=True;
      ShowMessage(TWinControl(Form1.Components[i]).Name);
    end;



Страницы: 1 вся ветка

Текущий архив: 2006.03.19;
Скачать: CL | DM;

Наверх




Память: 0.46 MB
Время: 0.027 c
5-1127302633
RDS
2005-09-21 15:37
2006.03.19
Access violation in design time


15-1140721369
ArtemESC
2006-02-23 22:02
2006.03.19
Иконки Delphi...


15-1141067951
Новичоккк
2006-02-27 22:19
2006.03.19
Комментарий в INI


2-1141391931
jenya
2006-03-03 16:18
2006.03.19
Из ColorDialog в Edit1, как текст, возможно?


10-1112691891
bon
2005-04-05 13:04
2006.03.19
AutoCad & Delphi