我试图沉沦DShellFolderViewEvents
使用 ATL,我能够成功订阅的唯一方法是DISPID_SELECTIONCHANGED
。标题中似乎列出了许多其他事件shdispid.h
,但我无法让他们开火。不确定我做错了什么(可能与 ATL 相关),但我想也许我正在使用错误的签名实现事件处理程序函数(目前我只是尝试不带参数的 void 函数)。问题是似乎没有描述的文档DShellFolderViewEvents
方法。有人知道如何解决这些问题吗?
您可以查看 shell32.dll 的类型库来获取接口声明。我使用Visual Studio自带的oleview.exe来打开DLL。界面看起来像这样:
[
uuid(62112AA2-EBE4-11CF-A5FB-0020AFE7292D),
helpstring("Event interface for ShellFolderView")
]
dispinterface DShellFolderViewEvents {
properties:
methods:
[id(0x000000c8), helpstring("The Selection in the view changed.")]
void SelectionChanged();
[id(0x000000c9), helpstring("The folder has finished enumerating (flashlight is gone).")]
void EnumDone();
[id(0x000000ca), helpstring("A verb was invoked on an items in the view (return false to cancel).")]
VARIANT_BOOL VerbInvoked();
[id(0x000000cb), helpstring("the default verb (double click) was invoked on an items in the view (return false to cancel).")]
VARIANT_BOOL DefaultVerbInvoked();
[id(0x000000cc), helpstring("user started to drag an item (return false to cancel).")]
VARIANT_BOOL BeginDrag();
};
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)