Re: List Control Images



It's difficult to say without seeing your actual code. Are you setting the
style to allow subitem images in the extended styles. Do you have the
latest version of Internet Explorer (above 4.1) that supports this feature?

Tom
"saywhat" <no@xxxxxx> wrote in message news:e6TXf.888$QV1.405@xxxxxxxxxxx
Boy this is really vexing me. PS thanks Tom for your help...

I've pored through the docs again, to no avail. I have a feeling there's
something I'm missing somewhere. I know the list class is created
properly.
Just want to slip a bitmap froma an imagelist into a column.

The imagelist is valid because I used it in the header control, voila,
there
it is, I can point to eash of the 4 images in the list without a problem.

Again TIA,.,,,

Bruce

"Tom Serface" <tserface@xxxxxxx> wrote in message
news:uqEjvwdVGHA.1344@xxxxxxxxxxxxxxxxxxxxxxx
This article describes a CListCtrl extension that allows you to have
images in subitems. Maybe you can learn something from the code here:

https://secure.codeproject.com/listctrl/ReportControl.asp

Specifically, in the Q&A at the bottom a user asked the same question and
the response was:

used these statements..CListCtrl m_ListFirst;

DWORD dwStyle =m_ListFirst.SendMessage(LVM_GETEXTENDEDLISTVIEWSTYLE,0,0);
dwStyle |= LVS_EX_FULLROWSELECT|LVS_EX_SUBITEMIMAGES;
m_ListFirst.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE,0,dwStyle);

and then....

m_ListFirst.SetItem(nItem, nSubItem, LVIF_IMAGE, NULL, nImage, 0, 0, 0);

This class extension all supports LVS_EX_SUBITEMIMAGES:

http://www.codeguru.com/Cpp/controls/listview/advanced/article.php/c4179/

Tom

"saywhat" <no@xxxxxx> wrote in message news:w9AXf.36$NJ.10@xxxxxxxxxxx

I have looked all around, and still can't see why this doesn't work.

I want to simply insert an image in a column of my list control. I
can't
seem to get my image past the first subitem, even if I use the LVITEM
structure. It will display the images denoted fromthe image list, bu
only in the first column.

Also when I use SetImageList for my control, The first image ion the
list
always appears before any text I insert in the first column. If I
comment out the SetImageList function, no image appears (duh).

Any ideas....TIA

b








.



Relevant Pages

  • Re: List Control Images(code included)
    ... I then used SetItem as indicated. ... I want to simply insert an image in a column of my list control. ... seem to get my image past the first subitem, even if I use the LVITEM ... always appears before any text I insert in the first column. ...
    (microsoft.public.vc.mfc)
  • Re: List Control Images
    ... I want to simply insert an image in a column of my list control. ... seem to get my image past the first subitem, even if I use the LVITEM ... always appears before any text I insert in the first column. ... comment out the SetImageList function, ...
    (microsoft.public.vc.mfc)
  • Re: List Control Images
    ... Both the list ctrl and the image were added to my view class as variables. ... I want to simply insert an image in a column of my list control. ... seem to get my image past the first subitem, even if I use the LVITEM ... always appears before any text I insert in the first column. ...
    (microsoft.public.vc.mfc)
  • Re: EventArgs and derived classes
    ... Basically I'm trying to implement checkboxes for every SubItem, ... If the first condition holds, but the second condition doesn't for the first column, then the first column is always going to wind up just calling e.DrawText, rather than going through the block of code that draws a checkbox. ... I'll take as granted that there's something about the checkboxes that the built-in class doesn't provide that you really need. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Question about list view: how to find out the subItem pointed by the mouse?
    ... Clay Burch, .NET MVP ... >I created a list view control which has 4 columns. ... > planning to add a dynamic tooltip to the control. ... > Everytime when the mouse hover over any subitem on column ...
    (microsoft.public.dotnet.framework.windowsforms)