<?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[[ListCtrl + ImageList] Hilfe, was mache ich falsch??]]></title><description><![CDATA[<p>Hallo zusammen,<br />
Ich habe in meinem Projekt ein gefülltes ListCtrl und wollte dieses mit Statusicons versehen.<br />
Leider bekomme ich die Bitmaps aber nie zu sehen. Ich bin am verzweifeln. Vielleicht kann euer geschultes Auge erkennen was schief läuft?</p>
<p>Mein code sieht folgendermaßen aus:</p>
<pre><code class="language-cpp">CListCtrl m_officialList;  //Dies natürlich im header
CImageList m_imageList;

m_imageList.Create(IDB_STATUSICON,16,3,0);
m_officialList.SetImageList(&amp;m_imageList, LVSIL_SMALL);

m_officialList.InsertItem(index, m_cProg.getFileName(index).c_str(),2);
m_officialList.SetItemText(lcounter1,1,m_cProg.getFileversion(index).c_str());
</code></pre>
<p>Alternativ habe ich es so versucht, kommt jedoch zum selben Ergebnis:</p>
<pre><code class="language-cpp">CListCtrl m_officialList; //Dies natürlich im header
CImageList m_imageList;

m_imageList.Create(16,16,ILC_MASK,3,3);
CBitmap bitmap;
bitmap.LoadBitmap(IDB_STATUSICON1);
m_imageList.Add(&amp;bitmap, 0);
bitmap.DeleteObject();
bitmap.LoadBitmap(IDB_STATUSICON2);
m_imageList.Add(&amp;bitmap, 0);
bitmap.DeleteObject();
bitmap.LoadBitmap(IDB_STATUSICON3);
m_imageList.Add(&amp;bitmap, 0);
bitmap.DeleteObject();
m_officialList.SetImageList(&amp;m_imageList, LVSIL_SMALL);

m_officialList.InsertItem(index, m_cProg.getFileName(index).c_str(),2);
m_officialList.SetItemText(lcounter1,1,m_cProg.getFileversion(index).c_str());
</code></pre>
<p>Bin noch neu in dem Geschäft und für jeden Tip dankbar! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Gruß exe222</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/174635/listctrl-imagelist-hilfe-was-mache-ich-falsch</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Apr 2026 09:22:14 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/174635.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 01 Mar 2007 13:27:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [ListCtrl + ImageList] Hilfe, was mache ich falsch?? on Thu, 01 Mar 2007 13:27:24 GMT]]></title><description><![CDATA[<p>Hallo zusammen,<br />
Ich habe in meinem Projekt ein gefülltes ListCtrl und wollte dieses mit Statusicons versehen.<br />
Leider bekomme ich die Bitmaps aber nie zu sehen. Ich bin am verzweifeln. Vielleicht kann euer geschultes Auge erkennen was schief läuft?</p>
<p>Mein code sieht folgendermaßen aus:</p>
<pre><code class="language-cpp">CListCtrl m_officialList;  //Dies natürlich im header
CImageList m_imageList;

m_imageList.Create(IDB_STATUSICON,16,3,0);
m_officialList.SetImageList(&amp;m_imageList, LVSIL_SMALL);

m_officialList.InsertItem(index, m_cProg.getFileName(index).c_str(),2);
m_officialList.SetItemText(lcounter1,1,m_cProg.getFileversion(index).c_str());
</code></pre>
<p>Alternativ habe ich es so versucht, kommt jedoch zum selben Ergebnis:</p>
<pre><code class="language-cpp">CListCtrl m_officialList; //Dies natürlich im header
CImageList m_imageList;

m_imageList.Create(16,16,ILC_MASK,3,3);
CBitmap bitmap;
bitmap.LoadBitmap(IDB_STATUSICON1);
m_imageList.Add(&amp;bitmap, 0);
bitmap.DeleteObject();
bitmap.LoadBitmap(IDB_STATUSICON2);
m_imageList.Add(&amp;bitmap, 0);
bitmap.DeleteObject();
bitmap.LoadBitmap(IDB_STATUSICON3);
m_imageList.Add(&amp;bitmap, 0);
bitmap.DeleteObject();
m_officialList.SetImageList(&amp;m_imageList, LVSIL_SMALL);

m_officialList.InsertItem(index, m_cProg.getFileName(index).c_str(),2);
m_officialList.SetItemText(lcounter1,1,m_cProg.getFileversion(index).c_str());
</code></pre>
<p>Bin noch neu in dem Geschäft und für jeden Tip dankbar! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Gruß exe222</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1237450</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1237450</guid><dc:creator><![CDATA[exe222]]></dc:creator><pubDate>Thu, 01 Mar 2007 13:27:24 GMT</pubDate></item><item><title><![CDATA[Reply to [ListCtrl + ImageList] Hilfe, was mache ich falsch?? on Thu, 01 Mar 2007 15:02:54 GMT]]></title><description><![CDATA[<p>Ist die Bitmap vielleicht schwarz-weiß? In den Aufrufen m_imageList.Create und m_imageList.Add gibst du nämlich an, dass schwarze Pixel transparent erscheinen sollen (letzter Parameter =0). Auf einem weißen Fensterhintergrund wäre dann nichts zu sehen.</p>
<p>Gruß Frdln</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1237555</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1237555</guid><dc:creator><![CDATA[Frdln]]></dc:creator><pubDate>Thu, 01 Mar 2007 15:02:54 GMT</pubDate></item><item><title><![CDATA[Reply to [ListCtrl + ImageList] Hilfe, was mache ich falsch?? on Fri, 02 Mar 2007 07:48:02 GMT]]></title><description><![CDATA[<p>Ne die Bitmaps sind alle farbig.<br />
Aber: Das Problem hat sich erledigt.. bin dank den faq im Forum noch<br />
auf die Lösung gekommen!</p>
<p>Trotzdem danke! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Greetz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1237858</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1237858</guid><dc:creator><![CDATA[exe222]]></dc:creator><pubDate>Fri, 02 Mar 2007 07:48:02 GMT</pubDate></item></channel></rss>