LoadIcon not working

Does anyone have a working example of loading an Icon (NOT BMP or cursor) from a res file. I have
been successful getting the Icons into the EXE but I cannot get a handle on them with LoadIcon,
It returns 0.

I tried the following:

var
  appIcon   : TIcon;
  icoHandle : HIcon;
begin

  appIcon := TIcon.Create;
  icoHandle := LoadIcon(HInstance,PChar('MYICON'));{MYICON is the name in the res file}
{I have also tried}
{  icoHandle := LoadIcon(HInstance,MakeIntResource('MYICON'));}
  ShowMessage('icoHandle: ' + IntToStr(icoHandle));{Returns 0}

  if icoHandle > 0 then begin
     appIcon.Handle := icoHandle;
     Application.Icon := appIcon;
  end else
     MessageDlg('Unable to Load Icon',mtError,[mbOk],0);

  appIcon.Free;          
--

I have been unable to find example code anywhere. The TI's from Borland don't address this.

TIA,

Cheers,

Matthew

==================================================================
Matthew McDermott
McDermott Enterprises
matt...@valleynet.com
My Web Page: http://www.valleynet.com/~matthew
------------------------------------------------------------------
Director of Information Services & Adjunct Professor - Mathematics
The American College of Prehospital Medicine: http://www.acpm.edu/
==================================================================