<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Codejock Listview Subitem Icons via SendMessage</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : Codejock Listview Subitem Icons via SendMessage]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 05:12:28 +0000</pubDate>
  <lastBuildDate>Wed, 16 Oct 2013 06:41:55 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=21816</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Codejock Listview Subitem Icons via SendMessage : I tried to set the first column...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=21816&amp;PID=71675&amp;title=codejock-listview-subitem-icons-via-sendmessage#71675</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6226">Willowmaster</a><br /><strong>Subject:</strong> 21816<br /><strong>Posted:</strong> 16 October 2013 at 6:41am<br /><br />I tried to set the first column the same way you set the subitems. That doesn't work. Second I tried to get the Icon handle by calling img.Icons.GetImage(1, 16).Handle and pass I to the SetLVSubImages function, but that doesn't work either. I don't think it's possible. Why don't you try the ReportControl? It does support this function and much more.]]>
   </description>
   <pubDate>Wed, 16 Oct 2013 06:41:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=21816&amp;PID=71675&amp;title=codejock-listview-subitem-icons-via-sendmessage#71675</guid>
  </item> 
  <item>
   <title><![CDATA[Codejock Listview Subitem Icons via SendMessage : no one can help me?? I need this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=21816&amp;PID=71457&amp;title=codejock-listview-subitem-icons-via-sendmessage#71457</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7412">Top3r</a><br /><strong>Subject:</strong> 21816<br /><strong>Posted:</strong> 29 July 2013 at 5:23am<br /><br />no one can help me?? I need this so much ^^<br>]]>
   </description>
   <pubDate>Mon, 29 Jul 2013 05:23:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=21816&amp;PID=71457&amp;title=codejock-listview-subitem-icons-via-sendmessage#71457</guid>
  </item> 
  <item>
   <title><![CDATA[Codejock Listview Subitem Icons via SendMessage : Hi,im getting crazy..Im trying...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=21816&amp;PID=71434&amp;title=codejock-listview-subitem-icons-via-sendmessage#71434</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7412">Top3r</a><br /><strong>Subject:</strong> 21816<br /><strong>Posted:</strong> 25 July 2013 at 5:20am<br /><br />Hi,<br>im getting crazy..<br><br><br>Im trying to add Icons to Subitems with a Codejock Listview (using vb6)<br><br><br>I found a Code for the Standard Listview from MS, there the Code works fine.<br><br>The Problem is that in the Codejock Listview i get no error and the "Icon Space" is there, but the Icon gets not drawed..<br><br><br><br>Here my Code..<br><br>The Result with MS Listview:<br><br><img src="http://i.imagebanana.com/img/hfxtcwuk/ms_listview.PNG" height="139" width="332" border="0" /><br><br><br><br>The Result with Codejock Listview:<br><img src="http://i.imagebanana.com/img/1ywwyg2a/cj_listview.PNG" height="112" width="668" border="0" /><br><br><br><br><span id="ToolBar1"></span><table width="99%"><tr><td><pre class="BBcode"><br>Option Explicit<br><br>Private Declare Function SendMessageLong Lib "user32" Alias _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ByVal wParam As Long, ByVal lParam As Long) As Long<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>Private Declare Function SendMessage Lib "user32" Alias _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ByVal wParam As Long, lParam As Any) As Long<br><br>Private Type LVITEM<br>&nbsp;&nbsp;&nbsp; mask As Long<br>&nbsp;&nbsp;&nbsp; iItem As Long<br>&nbsp;&nbsp;&nbsp; iSubItem As Long<br>&nbsp;&nbsp;&nbsp; state As Long<br>&nbsp;&nbsp;&nbsp; stateMask As Long<br>&nbsp;&nbsp;&nbsp; pszText As String<br>&nbsp;&nbsp;&nbsp; cchTextMax As Long<br>&nbsp;&nbsp;&nbsp; iImage As Long<br>&nbsp;&nbsp;&nbsp; lParam As Long<br>&nbsp;&nbsp;&nbsp; iIndent As Long<br>End Type<br><br>Private Const LVM_FIRST As Long = &amp;H1000&amp;<br>Private Const LVM_GETEXTENDEDLISTVIEWSTYLE As Long = (LVM_FIRST + 55)<br>Private Const LVM_SETEXTENDEDLISTVIEWSTYLE As Long = (LVM_FIRST + 54)<br>Private Const LVS_EX_SUBITEMIMAGES As Long = &amp;H2&amp;<br>Private Const LVIF_IMAGE As Long = &amp;H2&amp;<br>Private Const LVM_SETITEM As Long = (LVM_FIRST + 6)<br><br><br>Private Sub Form_Load()<br>Dim i As Integer<br><br>For i = 1 To 3<br>&nbsp;&nbsp;&nbsp; lv.ColumnHeaders.Add , , i, lv.Width / 4 - 100<br>Next<br><br>lv.Icons = img.Icons<br>lv.IconSize = 16<br><br>&nbsp;&nbsp;&nbsp; With lv<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ListItems.Add 1, , "Eintrag 1", 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ListItems.Add 2, , "Eintrag 2", 4<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ListItems.Add 3, , "Eintrag 3", 5<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ListItems.Item(1).SubItems(1) = "Eintrag 1B"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ListItems.Item(1).SubItems(2) = "Eintrag 1C"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ListItems.Item(2).SubItems(1) = "Eintrag 2B"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ListItems.Item(2).SubItems(2) = "Eintrag 2C"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ListItems.Item(3).SubItems(1) = "Eintrag 3B"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ListItems.Item(3).SubItems(2) = "Eintrag 3C"<br>&nbsp;&nbsp;&nbsp; End With<br>&nbsp;&nbsp;&nbsp; <br><br>End Sub<br><br>Private Sub Command1_Click()<br>&nbsp;&nbsp;&nbsp; Call SetLVSubImages(lv, 1, 1, 1, True)<br>&nbsp;&nbsp;&nbsp; Call SetLVSubImages(lv, 1, 2, 2, True)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Call SetLVSubImages(lv, 2, 1, 3, True)<br>&nbsp;&nbsp;&nbsp; Call SetLVSubImages(lv, 2, 2, 4, True)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Call SetLVSubImages(lv, 3, 1, 5, True)<br>&nbsp;&nbsp;&nbsp; Call SetLVSubImages(lv, 3, 2, 6, True)<br>End Sub<br><br>Private Sub SetLVSubImages(lv As ListView, ByVal Index, ByVal Column As Long, _<br>&nbsp;&nbsp;&nbsp; ByVal Image As Long, ByVal SubImagesOn As Boolean)<br>&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim lvStyle As Long, LV_Item As LVITEM<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; lvStyle = SendMessageLong(lv.hwnd, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; If SubImagesOn Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lvStyle = lvStyle Or LVS_EX_SUBITEMIMAGES<br>&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lvStyle = lvStyle And Not LVS_EX_SUBITEMIMAGES<br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Call SendMessageLong(lv.hwnd, _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LVM_SETEXTENDEDLISTVIEWSTYLE, 0, lvStyle)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; If SubImagesOn Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With LV_Item<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .mask = LVIF_IMAGE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .iSubItem = Column<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .iItem = Index - 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .iImage = Image<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call SendMessage(lv.hwnd, LVM_SETITEM, Index - 1, LV_Item)<br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; <br>End Sub<br></pre></td></tr></table><br><br><br><br>The only difference in the Code from the MS Listview is that on the end they are Refreshing the Listview with lv.REFRESH<br><br>But the Codejock Listview does not has this .Refresh Sub..<br>And the codejock Listview hasn't the ListSubitems(x).ReportIcon :(<br><br><br><br>Can anybody help me??<br><br><br>I uploaded the Sourcecode too if someone wants to test it..<br><a href="uploads/7412/Listview_Problem.zip" target="_blank" rel="nofollow">uploads/7412/Listview_Problem.zip</a><br><br><br>]]>
   </description>
   <pubDate>Thu, 25 Jul 2013 05:20:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=21816&amp;PID=71434&amp;title=codejock-listview-subitem-icons-via-sendmessage#71434</guid>
  </item> 
 </channel>
</rss>