有没有人完全实现过IShellBrowser :: InsertMenusSB? [英] Has anyone implemented IShellBrowser::InsertMenusSB fully?

查看:125
本文介绍了有没有人完全实现过IShellBrowser :: InsertMenusSB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力实现IShellBrowser主机(一个类似Explorer的对话框)的一个方面(可能很小):IShellBrowser :: InsertMenusSB()

根据MSDN文档,该方法是从IShellView调用的,以允许IShellBrowser填充帧级菜单,然后IShellView可以从本质上编辑生成的HMENU(启用,禁用,添加项目,删除它们,...)

但是,当我的操作者将HMENU留为空白时,IShellView也是如此(当它进入SetMenuSB时-HMENU仍然没有任何项).

如果用我认为是该菜单的正确上层结构填充HMENU(文件,编辑,视图,工具,帮助-具有MSDN指定的ID-FCIDM_MENU_FILE,FCIDM_MENU_EDIT等),我仍然会得到仅包含一个HMENU我添加的项目-IShellView对其没有添加任何内容.

我非常需要至少填充查看"菜单,因此我可以在IShellBrowser对话框中正确填充视图"下拉工具栏按钮(以充当较早的XP/2K样式文件对话框).
有人对这个有了解吗?!我没办法尝试了.

这是我在stackoverflow上问过的几个与此问题相关的链接:
当然有一种方法可以获取当前文件夹视图的完整视图"下拉列表吗?!
如何获得在IShellView上下文菜单中显示的IContextMenu?

解决方案

请查看以上指向stackoverflow.com的链接-答案在那里.

I am struggling with one - hopefully small - aspect of implementing an IShellBrowser host (an Explorer like dialog): IShellBrowser::InsertMenusSB()

According to MSDN docs, that method is called from IShellView in order to allow the IShellBrowser to populate the frame-level menu and then the IShellView can essentially edit the resulting HMENU (enable, disable, add items, remove them, ...)

However, when my hander leaves the HMENU blank, so does the IShellView (when it comes into SetMenuSB - the HMENU still has no items).

If I populate the HMENU with what I am guessing to be the correct superstructure for that menu (File, Edit, View, Tools, Help - with IDs specified by MSDN - FCIDM_MENU_FILE, FCIDM_MENU_EDIT, etc), I still get an HMENU that ONLY contains the items I added - the IShellView adds nothing to it.

I badly need the View menu at least to be populated, so I can properly populate the view drop-down toolbar button in my IShellBrowser dialog (to act as the older XP/2K style file dialog does).

Does anyone know anything about this?! I''m running out of ideas to try.

Here are a couple of links to this question as I''ve asked it over at stackoverflow:
Surely there is a way to obtain the full View pulldown for the current folder view?!
How might I obtain the IContextMenu that is displayed in an IShellView context menu?

解决方案

Please see the above links to stackoverflow.com - the answer is there.


这篇关于有没有人完全实现过IShellBrowser :: InsertMenusSB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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