View Full Version : Icons in Listviews?

08-22-2005, 03:33 PM
I'm populating a listview at runtime within an MSI custom action DLL. Here is a snippet:

hRecord = MsiCreateRecord(5);

MsiRecordSetString(hRecord, 1, L"PREREQS_CHECK");

MsiRecordSetInteger(hRecord, 2, ivRecordCount);

svRecordText = L"Info: ";
MsiRecordSetString(hRecord, 3, svRecordValueText);
MsiRecordSetString(hRecord, 4, svRecordText);
MsiRecordSetString(hRecord, 5, L"QuestionIcon");

I open and close all DB handles before and after as needed.

The "QuestionIcon" is an icon stored in the binary table. All the text is put into the listview the correct way, and it is displayed correctly, but I there is no icon displayed.

The odd part is, if I change the listview attribute to be sorted, I get the icon. I don't change any code, only the sorted attribute. I don't want to sort it, but its the only way I can see the icon.

Anyone ever seen this?