var
FileInfo: TSHFileInfo;
ImageListHandle: THandle;
NewPIDL: PItemIDList;
begin
OLECheck(SHGetDesktopFolder(FIDesktopFolder));
FIShellFolder := FIDesktopFolder;
FIDList := TList.Create;
ImageListHandle := SHGetFileInfo('',
0,
FileInfo,
SizeOf(FileInfo),
SHGFI_SYSICONINDEX or SHGFI_SMALLICON);
ImageList.Handle:=ImageListHandle;
{ SendMessage(ListView.Handle, LVM_SETIMAGELIST, LVSIL_SMALL, ImageListHandle);
ImageListHandle := SHGetFileInfo('C:\',
0,
FileInfo,
SizeOf(FileInfo),
SHGFI_SYSICONINDEX or SHGFI_LARGEICON);
SendMessage(ListView.Handle, LVM_SETIMAGELIST, LVSIL_NORMAL, ImageListHandle);}
OLECheck(
SHGetSpecialFolderLocation(
Application.Handle,
CSIDL_DRIVES,
NewPIDL)
);
SetPath(NewPIDL);
ActiveControl := cbPath;
cbPath.SelStart := 0;
cbPath.SelLength := Length(cbPath.Text);