哪位知道一个文件的文件类型是由哪个结构描述的?

一个傻冒 2003-11-24 12:39:31
在windows的资源管理器中,可以看到一个文件的文件类型.例如,word文档,JPEG等.
如果获取这个属性??应该怎么做?
...全文
100 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
modena 2003-11-25
  • 打赏
  • 举报
回复
FILETYPEATTRIBUTEFLAGS Constants

--------------------------------------------------------------------------------


Constants

FTA_Exclude (0x00000001)
Excludes the file class.

FTA_Show (0x00000002)
Shows file classes, such as folders, that aren't associated with a file name extension.

FTA_HasExtension (0x00000004)
Indicates that the file class has a file name extension.

FTA_NoEdit (0x00000008)
Prohibits editing of the registry entries associated with this file class, the addition of new entries, and the deletion or modification of existing entries.

FTA_NoRemove (0x00000010)
Prohibits deletion of the registry entries associated with this file class.

FTA_NoNewVerb (0x00000020)
Prohibits the addition of new verbs to the file class.

FTA_NoEditVerb (0x00000040)
Prohibits the modification or deletion of canonical verbs such as open and print.

FTA_NoRemoveVerb (0x00000080)
Prohibits the deletion of canonical verbs such as open and print.

FTA_NoEditDesc (0x00000100)
Prohibits the modification or deletion of the description of the file class.

FTA_NoEditIcon (0x00000200)
Prohibits the modification or deletion of the icon assigned to the file class.

FTA_NoEditDflt (0x00000400)
Prohibits the modification of the default verb.

FTA_NoEditVerbCmd (0x00000800)
Prohibits the modification of the commands associated with verbs.

FTA_NoEditVerbExe (0x00001000)
Prohibits the modification or deletion of verbs.

FTA_NoDDE (0x00002000)
Prohibits the modification or deletion of the DDE-related entries.

FTA_NoEditMIME (0x00008000)
Prohibits the modification or deletion of the content type and default extension entries.

FTA_OpenIsSafe (0x00010000)
Indicates that the file class's open verb can be safely invoked for downloaded files.

FTA_AlwaysUnsafe (0x00020000)
Prevents the "Never ask me" check box from being enabled. The user can override this attribute through the File Type dialog box.

FTA_AlwaysShowExt (0x00040000)
Causes the file class's file name extension is always shown, even if the user has selected the "Hide Extensions" option.

FTA_NoRecentDocs (0x00100000)
Prohibits the addition of members of this file class to the Recent Documents folder.

Remarks

The following example assigns the FTA_NoRemove (0x00000010) and FTA_NoNewVerb (0x00000020) attributes to the .myp file class.

HKEY_CLASSES_ROOT
.myp
(Default) = MyProgram.1
...
MyProgram.1
(Default) = MyProgram Application
EditFlags= 00 00 00 30

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧