3

早上好...我列出了目录中的所有文件...但是我面临以下问题...当文件夹出现时全部为英文...但是操作系统是葡萄牙语国防部...如何根据操作系统语言列出:

例如:程序文件 (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;
4

1 回答 1

1

好的葡萄牙语:

SHGetFileInfo(PChar(strPath + SearchRec.Name), 0, FileInfo,
                  SizeOf(FileInfo), SHGFI_DISPLAYNAME);
                Listitem.Caption := FileInfo.szDisplayName;
于 2014-12-13T01:22:33.917 回答