DirListView
所属分类:Windows编程
开发工具:Visual C++
文件大小:48KB
下载次数:78
上传日期:2004-12-09 11:33:07
上 传 者:
cocul
说明: VC 做的是一个ListView的对话框,用于显示目录和文件
(VC do is a ListView dialog box for the display of directories and files)
文件列表:
res\The.ico (1078, 1999-05-13)
res\The.rc2 (395, 1999-05-13)
res (0, 2004-09-13)
DirListCtrl.cpp (12277, 1999-06-29)
DirListCtrl.h (3555, 1999-06-23)
Resource.h (819, 1999-05-26)
StdAfx.cpp (201, 1999-05-13)
StdAfx.h (928, 1999-05-13)
The.aps (20992, 2004-09-13)
The.clw (2011, 2004-09-13)
The.dsp (4285, 1999-05-26)
The.dsw (636, 1999-06-23)
the.log (913, 2004-09-13)
The.ncb (91136, 2004-09-13)
The.opt (92160, 2004-09-13)
The.plg (1044, 2004-09-13)
The.rc (5571, 1999-06-23)
TheApp.cpp (1991, 1999-05-13)
TheApp.h (1299, 1999-05-13)
TheDlg.cpp (6554, 2004-09-13)
TheDlg.h (1681, 2004-09-13)
Q234310
SAMPLE: DirLV Sample Populates List Control Similar to Explorer
-------------------------------------------------------------------------------
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), included with:
- Microsoft Visual C++, 32-bit Editions, versions 5.0, 6.0
-------------------------------------------------------------------------------
SUMMARY
=======
DirLV.exe is a sample that demonstrates how to implement an Explorer-like
ListView control. The control handles some user-defined messages that make it
display the contents of a specified directory. The ListView control displays the
associated icon, the long file name, the size of the file, the file type, its
creation date, and the file attributes.
The sample illustrates how to:
- Use the system image list in an MFC application to display the icon
associated with every file.
- Implement the ListView control as a virtual ListView, that is, specify
LVS_OWNERDATA as a style for the ListView control. This causes the system to
send LVN_GETDISPINFO notifications to the control's parent for every item in
the list that needs to be displayed. This approach greatly improves
performance for large directories.
- Implement mouse and keyboard navigation: double-clicking a directory, or
typing when the focus item is a directory, will change the
displayed directory.
- Use a fast sorting algorithm provided in STL, to order the files
alphabetically.
The sample does not use ITEMIDLISTs to identify shell elements (that is, files)
nor does it use any of the associated shell interfaces. As a consequence, it
does not recognize link files as such, it does not handle virtual directories,
and it fails to identify an icon for console applications that don't have an
icon associated with them.
MORE INFORMATION
================
The following file is available for download from the Microsoft Software
Library. Click the file name below to download the file:
DirLV.exe (http://support.microsoft.com/download/support/mslfiles/DirLV.exe)
Release Date: Jul-23-1999
For more information about how to download files from the Microsoft Software
Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services
REFERENCES
==========
See the VListVw sample in the Online documentation.
(c) Microsoft Corporation 1999, All Rights Reserved.
Contributions by Cosmin Radu, Microsoft Corporation
Additional query words: List View CListCtrl SHGetFileInfo Directory LB_DIR Virtual Control
近期下载者:
相关文件:
收藏者: