Identify Component under mouse cursor does not work with TImage Control

Viewed 1199

I am using the following Procedure to identify the controls under my mouse in Delphi XE3. All works well for vcl.contols. However when the mouse is over a TImage, no control name is returned.

procedure TMainForm.ApplicationEvents1Idle(Sender: TObject; var Done: oolean);    
var
  ctrl : TWinControl;
begin    
  ctrl := FindVCLWindow(Mouse.CursorPos);     
  if ctrl <> nil then begin    
    Label2.caption := ctrl.Name;    
    //do something if mouse is over TLabeledEdit    
    if ctrl is TLabeledEdit the begin    
      Caption := TLabeledEdit(ctrl).Text;    
    end;
  end;
end;

Is there a simple way to access the names of a TImage - am I missing something really simple?

1 Answers
Related