A
awfigsk
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.formcreate(sender:TObject);
var
drive:char;
addedindex:integer;
begin
for drive:='a' to 'z' do
begin
case Getdirvetype(pchar(drive+':/')) of //[green]在这条语句中pchar()这种表示是进行强制性转换吗?[/green]
drive_removable:
addedindex:=drivetabset.tabs.addobject(drive,floppy.picture.graphic);
....
procedure TForm1.driveTabSetDrawTab(....)
var
bitmap:TBitmap;
begin
bitmap:=[blue]TBitmap(DriveTabset.tabs.objects[index]);[/blue]
with TabCanvas do
begin
Draw(r.left,r.top+4,bitmap);
[red]TextOut(r.left+2+bitmap.width,r.top+2,drivetabset.tabs[index]);[/red]
end;
end;
在上面的程序段中,请问
1、蓝色标记中DriveTabset.tabs.objects[index]这是个什么值?
2、红色标记中drivetabset.tabs[index]这又是个什么值?
var
drive:char;
addedindex:integer;
begin
for drive:='a' to 'z' do
begin
case Getdirvetype(pchar(drive+':/')) of //[green]在这条语句中pchar()这种表示是进行强制性转换吗?[/green]
drive_removable:
addedindex:=drivetabset.tabs.addobject(drive,floppy.picture.graphic);
....
procedure TForm1.driveTabSetDrawTab(....)
var
bitmap:TBitmap;
begin
bitmap:=[blue]TBitmap(DriveTabset.tabs.objects[index]);[/blue]
with TabCanvas do
begin
Draw(r.left,r.top+4,bitmap);
[red]TextOut(r.left+2+bitmap.width,r.top+2,drivetabset.tabs[index]);[/red]
end;
end;
在上面的程序段中,请问
1、蓝色标记中DriveTabset.tabs.objects[index]这是个什么值?
2、红色标记中drivetabset.tabs[index]这又是个什么值?