Registriert seit: 29. Mai 2002
Ort: Frankfurt
8.252 Beiträge
Delphi 2006 Professional
|
Re: Pfad für "Eigene Bilder"
18. Apr 2006, 09:05
Hai marlem,
test doch mal diese Methode:
Delphi-Quellcode:
uses
ShlObj;
const
CSIDL_MYPICTURES = $0027;
function GetShellFolder(CSIDL: Integer): string;
var
pidl: PItemIdList;
FolderPath: string;
SystemFolder: Integer;
begin
SystemFolder := CSIDL;
if SUCCEEDED(SHGetSpecialFolderLocation(0, SystemFolder, pidl)) then
begin
SetLength(FolderPath, max_path);
if SHGetPathFromIDList(pidl, Pchar(FolderPath)) then
begin
SetLength(FolderPath, strlen(Pchar(FolderPath)));
end;
end;
Result := FolderPath;
end;
procedure TDemoForm.Button1Click(Sender: TObject);
begin
ShowMessage(GetShellFolder(CSIDL_MYPICTURES));
end;
Stephan B.
|
|
Zitat
|