Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by ��
Sun, 26 Apr 1998 00:00
Re: How to do(2)
Author: ��
Date: Sun, 26 Apr 1998 00:00
Date: Sun, 26 Apr 1998 00:00
54 lines
2214 bytes
2214 bytes
> [1;36m==> Early_Chou(����װ��) ˵��: [37;40m[0m //admire Eaarly Chou but ���������������������,Ӳ��,����,��������������? > �������Win95��,�����������Shell APIȡ�����е�Drive��. > ��������Delphi 3��д��һ�δ���: > uses ShlObj; > procedure TForm1.Button1Click(Sender: TObject); > var > shf,shfDrv:IShellFolder; > pidl:PItemIDList; > enum:IEnumIDList; > f:integer; > StrRet:TStrRet; > s:string; > inout:integer; > begin > SHGetSpecialFolderLocation(Handle,CSIDL_DRIVES,pidl); > SHGetDesktopFolder(shf); > shf.BindToObject(pidl,nil,IID_IShellFolder,Pointer(shfDrv)); > shfDrv.EnumObjects(Handle,32,enum); > ListBox1.Items.Clear; > while enum.Next(1,pidl,f)=S_OK do > begin > // We only want Drives, no Control Panel and Printer included. > inout:=SFGAO_FILESYSTEM; > shfDrv.GetAttributesOf(1,pidl,inout); > if inout and SFGAO_FILESYSTEM=0 then > continue; > // Retrieve names of drives. > shfDrv.GetDisplayNameOf(pidl,1,StrRet); > case StrRet.uType of > STRRET_CSTR: s:=StrRet.cStr; > STRRET_WSTR: s:=StrRet.pOleStr; > STRRET_OFFSET: s:=PChar(@pidl.mkid)+StrRet.uOffset; > else s:=''; > end; > > // Append drive name to ListBox > ListBox1.Items.Add(S); //ȡ�õ����ַ����б��ListBox1��. > end; > end; > ���ҵĻ����ϲ���Ľ������: > 3.5����(A:) > System(C:) > Languages(D:) > Favorates(E:) > Languages(J:) \ > Languages(K:) / Substed Drives -- �� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads