Extract Ass Icon and Paint into TImage

How can I extract the associated icon (ExtractAssociatedIcon) and draw it into a Timage or a small area of the form?


uses ShellApi;

 

procedure TForm1.Button1Click(Sender: TObject);

var

  IconIndex : word;

  h : hIcon;

begin

  IconIndex := 0;

  h :=

  ExtractAssociatedIcon(hInstance,

  'C:\WINDOWS\NOTEPAD.EXE',

  IconINdex);

 

  DrawIcon(Form1.Canvas.Handle,

  10,

  10,

  h);