如何显示从C#应用程序的Windows资源管理器右键菜单? [英] How do you show the Windows Explorer context menu from a C# application?

查看:465
本文介绍了如何显示从C#应用程序的Windows资源管理器右键菜单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文件在上市我的申请,我想,让人们在一个项目单击鼠标右键,显示Windows资源管理器上下文菜单。我假设我需要请使用IContextMenu接口,但我真的不知道从哪里开始。

I have a file listing in my application and I would like to allow people to right-click on an item and show the Windows Explorer context menu. I'm assuming I would need to use the IContextMenu interface, but I'm not really sure where to start.

推荐答案

有一个非常好的教程(虽然C ++)约在11份关于Raymond Chen的博客托管的IContextMenu(按顺序):

There's a very good tutorial (albeit in C++) about hosting an IContextMenu on Raymond Chen's blog in 11 parts (in order):


  1. 初次涉足

  2. 显示上下文菜单

  3. 调用地点

  4. 主要方面

  5. 处理菜单消息

  6. 显示菜单中的帮助

  7. 调用默认的动词

  8. 优化默认的命令

  9. 添加自定义命令

  10. 复合扩展 - 基础

  11. 复合扩展 - 组成

  1. Initial foray
  2. Displaying the context menu
  3. Invocation location
  4. Key context
  5. Handling menu messages
  6. Displaying menu help
  7. Invoking the default verb
  8. Optimizing for the default command
  9. Adding custom commands
  10. Composite extensions - groundwork
  11. Composite extensions - composition

这篇关于如何显示从C#应用程序的Windows资源管理器右键菜单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆