早上好......我列出目录中的所有文件......但是我面临以下问题......当文件夹出现时全部用英语...但操作系统是国防部的葡萄牙语...如何根据操作系统语言列出它:
例如:程序文件(EN) - > Arquivos de Programa(PT)
if FindFirst (directory + '*. *', faAnyFile, search_rec) = 0 then
begin
repeat
Form4.ListView1.Items.Add.Caption: = search_rec.Name;
lista.Add (search_rec.Name);
Until FindNext (search_rec) <> 0;
FindClose (search_rec);
end;
答案 0 :(得分:1)
Ok葡萄牙语:
SHGetFileInfo(PChar(strPath + SearchRec.Name), 0, FileInfo,
SizeOf(FileInfo), SHGFI_DISPLAYNAME);
Listitem.Caption := FileInfo.szDisplayName;