Title: list all directories, files and drives in a listbox?
procedure TForm1.Button1Click(Sender: TObject);
var
D: PChar;
begin
D := 'C:\*.*';
SendMessage(ListBox1.Handle,
LB_DIR,
DDL_ARCHIVE +
DDL_DIRECTORY +
DDL_DRIVES +
DDL_EXCLUSIVE +
DDL_HIDDEN +
DDL_READONLY +
DDL_READWRITE +
DDL_SYSTEM,
Integer(D));
end;
//Oder:
//Or:
procedure TForm1.Button2Click(Sender: TObject);
var
D: PChar;
begin
D := 'C:\*.*';
ListBox2.Perform(LB_DIR,
DDL_ARCHIVE +
DDL_DIRECTORY +
DDL_DRIVES +
DDL_EXCLUSIVE +
DDL_HIDDEN +
DDL_READONLY +
DDL_READWRITE +
DDL_SYSTEM,
Integer(d));
end;