惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - 柠檬隐士

C#一行代码实现整数取反函数 Win8下使用Ctrl加空格来切换输入法 3L软件网站 - 音速启动 (C#)Windows Shell 外壳编程系列8 - 同后缀名不同图标? (C#)Windows Shell 外壳编程系列7 - ContextMenu 注册文件右键菜单 .NET 异常处理 WebBrowser控件使用详解 SQL连接查询深度探险 悲壮的一天,记华为核心网面试经历 光驱发展史 50年变大了八万倍!超经典硬盘发展史 回首风雨路 笔记本二十年发展史 技术革命 十年芯片组发展回顾 鼠标37年发展史 浅谈键盘的发展史 - 柠檬隐士 声卡发展史 见证PC发展历史:细数内存的发展历程 - 柠檬隐士 从胡萝卜到4毫秒:液晶显示器发展的120年 - 柠檬隐士 从8Mhz到4Ghz+ CPU发展历程也精彩 - 柠檬隐士
(C#)Windows Shell 外壳编程系列9 - QueryInfo 扩展提示
柠檬隐士 · 2008-09-03 · via 博客园 - 柠檬隐士

(本系列文章由柠檬的(lc_mtt)原创,转载请注明出处,谢谢~)

接上一节:(C#)Windows Shell 外壳编程系列8 - 同后缀名不同图标?

QueryInfo扩展
活动桌面引入一项新特性,当你在某些特定对象上旋停鼠标时,工具提示将显示它们的描述。我们可以使用 QueryInfo 扩展为Shell中的其它对象提供自定义的工具提示。如下图:

事实上,这个功能实现比前两个 Shell 扩展更简单,它仅仅是实现

IQueryInfo 接口:

IQueryInfo 接口定义

IQueryInfo 接口只包含两个函数,其中 GetInfoFlags 目前还不被支持并且必须返回 0。

GetInfoTip() 让我们返回工具提示文本 字符串。其参数:

dwFlags 当前并不被使用。

pszInfoTip 是个Unicode 字符串指针变量的指针,我们要将其赋值为我们所分配的字符串缓冲区的指针。

还记得之前使用 IPersistFile 接口获取单个文件路径保存在 szFileName 变量中吗?现在也可以使用:

GetInfoTip

代码:https://files.cnblogs.com/lemony/MyContextMenu.rar

这一章似乎过于简单。下一章将简述如何使用 IShellPropSheetExt 接口为文件/文件夹增加属性页,如下: