<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[System Icons]]></title><description><![CDATA[<p>hallo<br />
ich möchte die System Icons, oder die Icons einer Datei in ein TImageList laden.<br />
Da die forum suche nichts sinnvolles Ausspuckt und die anderen dinge ich irgendwie nicht hinbekomme.</p>
<pre><code class="language-cpp">HICON TfmMain::GetFileIconHandle(AnsiString strFileName, bool bSmallIcon)
{
	SHFILEINFO sfi;
	if (bSmallIcon)
	{
		SHGetFileInfo(
		   strFileName.c_str(),
		   FILE_ATTRIBUTE_NORMAL,
		   &amp;sfi,
		   sizeof(SHFILEINFO),
		   SHGFI_ICON | SHGFI_SMALLICON | SHGFI_USEFILEATTRIBUTES);
	}
	else
	{
		SHGetFileInfo(
		   strFileName.c_str(),
		   FILE_ATTRIBUTE_NORMAL,
		   &amp;sfi,
		   sizeof(SHFILEINFO),
		   SHGFI_ICON | SHGFI_LARGEICON | SHGFI_USEFILEATTRIBUTES);
	}
	return sfi.hIcon
</code></pre>
<p>Damit hab ichs versucht, aber ich find nicht über &quot;HICON&quot; und komm da net weiter!<br />
vll könnt ihr mir helfen<br />
Gruß KY</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/167668/system-icons</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 06:55:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/167668.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Dec 2006 15:39:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to System Icons on Wed, 13 Dec 2006 15:39:34 GMT]]></title><description><![CDATA[<p>hallo<br />
ich möchte die System Icons, oder die Icons einer Datei in ein TImageList laden.<br />
Da die forum suche nichts sinnvolles Ausspuckt und die anderen dinge ich irgendwie nicht hinbekomme.</p>
<pre><code class="language-cpp">HICON TfmMain::GetFileIconHandle(AnsiString strFileName, bool bSmallIcon)
{
	SHFILEINFO sfi;
	if (bSmallIcon)
	{
		SHGetFileInfo(
		   strFileName.c_str(),
		   FILE_ATTRIBUTE_NORMAL,
		   &amp;sfi,
		   sizeof(SHFILEINFO),
		   SHGFI_ICON | SHGFI_SMALLICON | SHGFI_USEFILEATTRIBUTES);
	}
	else
	{
		SHGetFileInfo(
		   strFileName.c_str(),
		   FILE_ATTRIBUTE_NORMAL,
		   &amp;sfi,
		   sizeof(SHFILEINFO),
		   SHGFI_ICON | SHGFI_LARGEICON | SHGFI_USEFILEATTRIBUTES);
	}
	return sfi.hIcon
</code></pre>
<p>Damit hab ichs versucht, aber ich find nicht über &quot;HICON&quot; und komm da net weiter!<br />
vll könnt ihr mir helfen<br />
Gruß KY</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1191286</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1191286</guid><dc:creator><![CDATA[ky_fr34k]]></dc:creator><pubDate>Wed, 13 Dec 2006 15:39:34 GMT</pubDate></item><item><title><![CDATA[Reply to System Icons on Thu, 14 Dec 2006 18:06:18 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>kannst du nicht <strong>ExtractIcon</strong> bzw. <strong>ExtractIconEx</strong> nehmen?</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------
void TForm1::FillImageList(const String &amp; FileName)
{
 int AnzahlIcons = int(ExtractIcon(Form1-&gt;Handle, FileName.c_str(), -1) );
 if (AnzahlIcons != NULL)
 {
   TIcon *MyIcon = new TIcon();
   for (int i=0;i&lt;AnzahlIcons;i++)
   {
     MyIcon-&gt;Handle = ExtractIcon(Form1-&gt;Handle,FileName.c_str(),i);
     ImageList1-&gt;AddIcon(MyIcon);
   }
 }
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
 FillImageList(&quot;C:\\WINDOWS\\system32\\SHELL32.dll&quot;);
 for(int i=0;i&lt;ImageList1-&gt;Count;i++)
 {
   TIcon *MyIcon = new TIcon();
   try
   {
    ImageList1-&gt;GetIcon(i,MyIcon);
    Image1-&gt;Canvas-&gt;Draw(1,(ImageList1-&gt;Height*i)+2,MyIcon);
   }
   catch(Exception &amp; ex)
   {
    ShowMessage(ex.Message);
   }
 }
}
//---------------------------------------------------------------------------
</code></pre>
<p>MfG Barracuda</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1191964</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1191964</guid><dc:creator><![CDATA[Barracuda]]></dc:creator><pubDate>Thu, 14 Dec 2006 18:06:18 GMT</pubDate></item><item><title><![CDATA[Reply to System Icons on Thu, 14 Dec 2006 20:04:01 GMT]]></title><description><![CDATA[<p>cool funktioniert super!!<br />
weißt du auch wie ich herausfinden kann, welches icon ein ordner oder eine datei hat, die ich mit findfirst, findnext,... gefunden hab?<br />
Gruß und Danke KY</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1192028</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1192028</guid><dc:creator><![CDATA[ky_fr34k]]></dc:creator><pubDate>Thu, 14 Dec 2006 20:04:01 GMT</pubDate></item></channel></rss>