Demo 3
unit pidlunit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
shellapi, activex, shlobj, StdCtrls, OleCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
Bi: TBrowseInfo;
dispname: array[0..MAX_PATH] of char;
SelectPidl, HistPidl: PItemIdlist;
begin
ShGetSpecialFolderLocation(handle, CSIDL_HISTORY, HistPidl);
with Bi do begin
hwndOwner := Handle;
PidlRoot := HistPidl;
pszDisplayName := Dispname;
lpszTitle := Pchar('UrlHistory Demo');
ulFlags := BIF_BrowseIncludeFiles;
lpfn := nil;
lParam := uint(self);
end;
SelectPidl := shbrowseforfolder(bi);
end.