the path to the api is wrong, i dont get it, if i fill instead of
SHGetFileInfo(pathandfile
SHGetFileInfo("c:\\"
i do get the right icon /???
snippet:
/////////////////////////////////
String ding = "C:\\" + LocalFile;
char *pathandfile= ding.c_str();
ShowMessage(pathandfile);
SHFILEINFO info;
DWORD result = SHGetFileInfo(pathandfile,
0,
&info,
sizeof(info),
SHGFI_ICON |
SHGFI_SMALLICON |
SHGFI_SHELLICONSIZE |
SHGFI_SYSICONINDEX);
if(result != 0)
ImageList1->GetIcon(5,Image1->Picture->Icon);
pItem->ImageIndex = 5;
}
/////////////////////////////////
SHGetFileInfo(pathandfile
SHGetFileInfo("c:\\"
i do get the right icon /???
snippet:
/////////////////////////////////
String ding = "C:\\" + LocalFile;
char *pathandfile= ding.c_str();
ShowMessage(pathandfile);
SHFILEINFO info;
DWORD result = SHGetFileInfo(pathandfile,
0,
&info,
sizeof(info),
SHGFI_ICON |
SHGFI_SMALLICON |
SHGFI_SHELLICONSIZE |
SHGFI_SYSICONINDEX);
if(result != 0)
ImageList1->GetIcon(5,Image1->Picture->Icon);
pItem->ImageIndex = 5;
}
/////////////////////////////////