bougdary-pdiorcty

所属分类:.net编程
开发工具:Visual Basic
文件大小:146KB
下载次数:1
上传日期:2018-05-09 09:50:35
上 传 者jbig$95998
说明:  模仿Windows资料管理器的目录树效果源代码

文件列表:
9Comctl32_471.bas (10767, 1999-03-12)
DBGWPROC.DLL (27136, 1997-06-10)
EnumDeskVB.exe (103424, 1999-03-12)
EnumDeskVB.frm (13032, 1999-03-12)
EnumDeskVB.frx (542, 1999-03-12)
EnumDeskVB.VBP (1846, 1999-03-12)
EnumDeskVB.vbw (515, 1999-08-29)
ILDefs_471.bas (8053, 1999-03-12)
IShellFolder.bas (20380, 1999-03-12)
ISHF_Ex.tlb (18728, 1999-03-12)
LVCalls.bas (11303, 1999-03-12)
LVDefs_471.bas (15328, 1999-03-12)
LVMacros_471.bas (18506, 1999-03-12)
MSSCCPRJ.SCC (197, 1999-07-26)
Notify.bas (21592, 1999-03-12)
Rccrpregutil (0, 2017-10-25)
Rccrpregutil\ccrpRegUtil.exe (20480, 1998-08-14)
Rccrpregutil\ccrpRegUtil_AddReg.inf (2830, 1998-08-14)
Rccrpregutil\ccrpRegUtil_DelReg.inf (775, 1998-08-14)
SHDefs.bas (16926, 1999-03-12)
TVCalls.bas (18554, 1999-03-12)
TVDefs_471.bas (9259, 1999-03-12)
TVMacros_471.bas (17367, 1999-03-12)
typelib (0, 2017-10-25)
typelib\ICtxMenu.odl (6313, 1999-03-12)
typelib\IEnumIDL.odl (750, 1997-09-12)
typelib\IMalloc.odl (1124, 1997-09-12)
typelib\ISHFoldr.odl (5995, 1999-03-12)
typelib\ISHF_Ex.bat (36, 1997-09-12)
typelib\ISHF_Ex.odl (750, 1999-03-12)
typelib\ISHTypes.odl (1822, 1997-09-12)
typelib\ISHView.odl (10887, 1999-03-12)
typelib\IUnknown.odl (382, 1999-03-12)
typelib\Wintypes.odl (3233, 1999-03-12)
VSplit.cur (518, 1995-10-09)
VSplitter.cls (15640, 1999-03-12)
WinDefs.bas (19645, 1999-03-12)
WinProc_dbg.bas (32070, 1999-03-12)
... ...

Common Controls Replacement Project EnumDeskVB demo Revision 2 - 03/12/99 This Visual Basic 5 example demonstrates how to dynamically create at runtime both the treeview and listview controls exposed by the common control library Comctl32.dll, without the use of VB's Comctl32.ocx. Basic Explorer style functionality is also demonstrated via the implementation of the IShellFolder, IEnumIDList and IContextMenu shell interfaces. Overview of functionality ========================= Treeview - Utilizes the system imagelist for small and selected icon display. - The root folder can be specified via the SHBrowseForFolder dialog. - Notification messages processed: - TVN_SELCHANGED: Fills the listview with the selected folder's contents. - TVN_ITEMEXPANDING: Expands the selected folder, inserts it's subfolders under it, implements a callback function to sort the subfolders. - NM_RCLICK: Presents the folder's context menu via the IContextMenu interface. - TVN_DELETEITEM: Deletes item, freeing allocated memory. Listview - Utilizes the system imagelists for small and large icon display. - Notification messages processed: - LVN_GETDISPINFO: Displays item text and images as needed, implements a callback function for sorting. - NM_RCLICK: Presents the item's context menu via the IContextMenu interface. - NM_DBLCLK and NM_RETURN Expand & selects a folder in the treeview, or executes an item's program/command. - LVN_KEYDOWN: Processes the backspace and Ctrl+A keystrokes - LVN_DELETEITEM: Deletes item, frees allocated memory. Includes all treeview, listview and imagelist C definitions and macros converted to VB code (with the exception of CustomDraw). The code is fairly heavily documented. As well, there's a rather interesting implementation of IUnknown (for IShellFolder AddRefs), a bit of a different type of a splitter bar is demonstrated and contains some handy window procedure debugging code. Installation ============ The "Debug Object for AddressOf Subclassing" (Dbgwproc.dll) found at the VB owner's area on the MS web site, and the "IShellFolder Extended Type Library v1.2" (ISHF_Ex.tlb), the type library containing the aforementioned interfaces, are both included and must be registered and referenced by the project for things to work correctly. The demo code was tested on Win95 4.00.950a IE3 and IE4, Win***, WinNT4 WorkStation (SP3) and WinNT5 b2. Comments ======== The difficulty of coding the treeview and listview controls in VB is obvious. Although the treeview doesn't really seem that bad, i.e. it has one view, no columns or headers, one sort direction, etc. If you get into more Explorer type functionality such as drag and drop and shell change notifications then things can get a bit more involved. But for the most part the demonstration code isn't too difficult... The listview is definitely another story though. What seems the biggest challenge is dynamically changing the listview columns to accommodate different namespace extension views for folder object contents, i.e. file folders, Fonts folder, Internet cache folder, etc. This one is a handful. As well, since both common controls are not present on the VB Form when it is created, and do not implement any control site interfaces, they are not recognized in the Form's tab order. This functionality is left as an exercise for the interested developer. Distribution notice =================== You are free to distribute Edeskvb2.zip in it's original state to any public WWW site, online service or BBS without explicitly obtaining the authors permission. (Notification would be appreciated). If you wish to distribute Edeskvb2.zip by any other means (i.e. if you want to include it on a CD or any other software media) then the EXPRESS PERMISSION of the author is REQUIRED. Revision history ================ 03/12/99, revision 2 Completely reworked all code, cleaned it up and streamlined it, and removed many bugs, such as: - IMalloc.Free method calls were not freeing memory, the ByVal keyword was added to fix this. - ANSI string pointers are now used correctly. - IShellFolder interface object references are handled more intuitively Added new functionality: - Added keystroke functionality for the listview - Added SHBrowseForFolder code allowing the treeview's root folder to be specified. - Replaced the Form's splitter code with the componentized and more versatile VSplitter class module. - Utilizes the IContextMenu2 interface, filling the Send To submenu's items. 09/16/97, initial release Credits ======= The demo is a general VB rendition of Nancy Cluts' (MS) EnumDesk C code example, which was last found at: http://www.microsoft.com/win32dev/wtop.htm A special thanks goes out to Ramon Guerrero for providing the initial and ongoing inspiration to complete this project. Without his presence in the CCRP group, I never would have attempted this. His incredible common control examples can be found at http://www.zonecorp.com/vb5. Brought to you by Brad Martinez, http://www.mvps.org/ccrp Member of the VB Common Controls Replacement Project, a group aiming to provide separate ActiveX controls to replace and extend the controls found in COMCTL32.OCX.

近期下载者

相关文件


收藏者