Einzelnen Beitrag anzeigen

grenzgaenger
(Gast)

n/a Beiträge
 
#3

Re: Standardordner "Eigene Bilder"

  Alt 17. Feb 2008, 20:55
versuch's mal mit
  • CSIDL_MYPICTURES = $27; // Eigene Bilder


Delphi-Quellcode:
FUNCTION GetSpecialFolder(hWindow: HWND; Folder: INTEGER): STRING;
VAR
 pMalloc: IMalloc;
 pidl: PItemIDList;
 Path: PChar;
BEGIN
 IF (SHGetMalloc(pMalloc) <> S_OK) THEN
 BEGIN
  MessageBox(hWindow, 'Couldn''t get pointer to IMalloc interface.', 'SHGetMalloc(pMalloc)', 16);
  Exit;
 END;
 SHGetSpecialFolderLocation(hWindow, Folder, pidl);
 GetMem(Path, MAX_PATH);
 SHGetPathFromIDList(pidl, Path);
 Result := Path;
 FreeMem(Path);

 pMalloc.Free(pidl);
END;
<HTH>
  Mit Zitat antworten Zitat