WhiteUnicorn |
| |
#WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ > | |
|
How do I display the icon that is associated with a given file type?
Use the ShellApi function ExtractAssociatedIcon() to retrieve the icon that is associated with the file. Example: uses ShellApi; procedure TForm1.Button1Click(Sender: TObject); var Icon : hIcon; IconIndex : word; begin Icon := ExtractAssociatedIcon(HInstance, 'C:\SomePath\SomeFile.ext', IconIndex); DrawIcon(Form1.Canvas.Handle, 10, 10, Icon); end;
| |
#WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ > | |
|
| ||
Anastasija aka WhiteUnicorn |
LiveJournal PhotoFile |
|
|