Вниз
Скачать: 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 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.026 c
2-1141057077
John_Doe
2006-02-27 19:17
2006.03.19
SQL не воспринимает дату


15-1140863196
PARUS
2006-02-25 13:26
2006.03.19
Music Instrumental Digital Interface Как-то так...


2-1141381406
Fl@sh
2006-03-03 13:23
2006.03.19
FireBird & CreateDatabase


3-1138267273
kyn66
2006-01-26 12:21
2006.03.19
Как спрятать скроллинг по гриду ?


2-1141060133
myself
2006-02-27 20:08
2006.03.19
Delphi 16-bit complile




   Наверх