CMFCShellListCtrl怎样显示隐藏文件和系统文件?
发布网友
发布时间:2023-06-06 09:03
我来回答
共1个回答
热心网友
时间:2024-11-26 18:53
SetItemTypes()函数可以设定列表中显示的项的类型...
函数原型
:void
SetItemTypes(
SHCONTF
nTypes
);其中SHCONTF结构定义如下:typedef
enum
_SHCONTF
{
SHCONTF_CHECKING_FOR_CHILDREN
=
0x00010,
SHCONTF_FOLDERS
=
0x00020,
SHCONTF_NONFOLDERS
=
0x00040,
SHCONTF_INCLUDEHIDDEN
=
0x00080,
SHCONTF_INIT_ON_FIRST_NEXT
=
0x00100,
SHCONTF_NETPRINTERSRCH
=
0x00200,
SHCONTF_SHAREABLE
=
0x00400,
SHCONTF_STORAGE
=
0x00800,
SHCONTF_NAVIGATION_ENUM
=
0x01000,
SHCONTF_FASTITEMS
=
0x02000,
SHCONTF_FLATLIST
=
0x04000,
SHCONTF_ENABLE_ASYNC
=
0x08000,
SHCONTF_INCLUDESUPERHIDDEN
=
0x10000
}
SHCONTF;看到那个SHCONTF_INCLUDEHIDDEN
了么?这个是显示
隐藏文件
...显示系统文件的话,要再加上SHCONTF_INCLUDESUPERHIDDEN....MSDN中的描述:SHCONTF_INCLUDEHIDDEN0x00080.
Include
hidden
items
in
the
enumeration.
This
does
not
include
hidden
system
items.
(To
include
hidden
system
items,
use
SHCONTF_INCLUDESUPERHIDDEN.)参考
http://msdn.microsoft.com/en-us/library/bb982389.aspx
以及
http://msdn.microsoft.com/en-us/library/bb983966.aspx