{折腾很久了,想不出怎么算出在机器装双系统时,求得到当前系统中Fonts文件位置-难题?}{还有下面得语句错了,自己搞不定?}function GetFontsDir: String;
var
  ac: array [1..20] of Char;
  pc: PChar;
begin
  pc := @ac;
  GetFontsDirectory(pc, 20); {问题在这句话怎么错了}
  Result := pc;
end;

解决方案 »

  1.   

    GetFontsDirectory?有这个函数吗??
      

  2.   


    这是以为GetWindowsDirectory可以改为GetFontsDirectory的
      

  3.   

    那你还不如遍历整个系统盘……找Fonts文件的位置
      

  4.   

    遍历整个系统盘,找Fonts的位置
      

  5.   

    遍历整个系统盘,找Fonts的位置
      

  6.   

    遍历整个系统盘,找Fonts的位置
      

  7.   

    查找注册表
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]下的Fonts的键值~~
      

  8.   

    Fonts是固定在Windows目录下面的,function GetFontDir:String;
    var
      WinDir,FontDir: string;
      aWinDir: array[0..Max_Path] of char;
    begin
      GetWindowsDirectory(aWinDir,Max_Path);
      WinDir := string(aWinDir);
      FontDir := WinDir + '\Fonts';
      Result := FontDir;
    end;