<?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[ListView + ImageList]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich hänge derzeit an einem Problem an dem ich einfach nicht weiter komme. Ich habe in meinem Programm ein ListCtrl im Report Style und möchte für eine bestimmte Spalte ein Bild vorm Text anzeigen lassen. Das funktioniert im Prinzip indem ich eine ImageList mit dem ListCtrl &quot;verbinde&quot;. Mein Problem ist nun, dass für die erste Spalte des ListCtrl immer das Bild oder zumindest Platz dafür gelassen wird. Ich möchte aber dort gar kein Bild sondern eben nur in einer bestimmten Spalte. Hier mal mein bisheriger Code (teilweise Pseudocode):</p>
<pre><code class="language-cpp">SendMessage (hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_SUBITEMIMAGES);

himlSmall = ImageList_LoadImage (hModule, MAKEINTRESOURCE (IDB_BITMAPERROR), 32, 2, CLR_NONE, IMAGE_BITMAP, LR_DEFAULTCOLOR);

ListView_SetImageList (hList, himlSmall, LVSIL_SMALL); 

LvItem.mask   = LVIF_TEXT;
LvItem.iImage = 0;

if (LvItem.iSubItem == 3)
{
    LvItem.mask   = LVIF_TEXT | LVIF_IMAGE;
    LvItem.iImage = 1;
}

if (SubItem)
    SendMessage (hList, LVM_INSERTITEM, 0, reinterpret_cast&lt;LPARAM&gt; (&amp;LvItem));
else
    SendMessage (hList, LVM_SETITEM, 0, reinterpret_cast&lt;LPARAM&gt; (&amp;LvItem));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/208299/listview-imagelist</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 21:01:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/208299.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Mar 2008 11:42:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ListView + ImageList on Mon, 17 Mar 2008 11:43:49 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich hänge derzeit an einem Problem an dem ich einfach nicht weiter komme. Ich habe in meinem Programm ein ListCtrl im Report Style und möchte für eine bestimmte Spalte ein Bild vorm Text anzeigen lassen. Das funktioniert im Prinzip indem ich eine ImageList mit dem ListCtrl &quot;verbinde&quot;. Mein Problem ist nun, dass für die erste Spalte des ListCtrl immer das Bild oder zumindest Platz dafür gelassen wird. Ich möchte aber dort gar kein Bild sondern eben nur in einer bestimmten Spalte. Hier mal mein bisheriger Code (teilweise Pseudocode):</p>
<pre><code class="language-cpp">SendMessage (hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_SUBITEMIMAGES);

himlSmall = ImageList_LoadImage (hModule, MAKEINTRESOURCE (IDB_BITMAPERROR), 32, 2, CLR_NONE, IMAGE_BITMAP, LR_DEFAULTCOLOR);

ListView_SetImageList (hList, himlSmall, LVSIL_SMALL); 

LvItem.mask   = LVIF_TEXT;
LvItem.iImage = 0;

if (LvItem.iSubItem == 3)
{
    LvItem.mask   = LVIF_TEXT | LVIF_IMAGE;
    LvItem.iImage = 1;
}

if (SubItem)
    SendMessage (hList, LVM_INSERTITEM, 0, reinterpret_cast&lt;LPARAM&gt; (&amp;LvItem));
else
    SendMessage (hList, LVM_SETITEM, 0, reinterpret_cast&lt;LPARAM&gt; (&amp;LvItem));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1475749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1475749</guid><dc:creator><![CDATA[yogle]]></dc:creator><pubDate>Mon, 17 Mar 2008 11:43:49 GMT</pubDate></item><item><title><![CDATA[Reply to ListView + ImageList on Fri, 21 Mar 2008 16:33:37 GMT]]></title><description><![CDATA[<p>So weit ich weis gibt es dafür keine Lösung.</p>
<p>Auf meiner Homepage <a href="http://members.inode.at/anton.zechner/az/index.html" rel="nofollow">http://members.inode.at/anton.zechner/az/index.html</a><br />
gibt es ein Beispiel zu einem speziellen Tree-Control. (unter &quot;TreeList&quot;)</p>
<p>Mann kann es auch als List-Control verwenden.<br />
Mit den Nachrichten TVM_GETROWOFITEM und TVM_GETITEMOFROW kann man zwischen<br />
HTREEITEM und den Reihen hin und her rechen. Damit kann man das Control fast<br />
gleich ansprechen wie ein List-Control.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1478395</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1478395</guid><dc:creator><![CDATA[AZ]]></dc:creator><pubDate>Fri, 21 Mar 2008 16:33:37 GMT</pubDate></item></channel></rss>