未分类--Windows API--CDefFolderMenu_Create2

来源:互联网 发布:爱淘宝红包推广 编辑:程序博客网 时间:2024/05/02 03:36

原文来自MSDN Library for Visual Studio 2008 SP1,翻译部分仅为个人观点,想要看更多信息请看MSDN,如有版权问题请联系QQ 643166601,邮件643166601@qq.com

 

CDefFolderMenu_Create2 Function

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

Creates a context menu for a selected group of file folder objects.
选择组的文件夹对象为了创建一个上下文菜单。
Syntax

int CDefFolderMenu_Create2(         
PCIDLIST_ABSOLUTE pidlFolder,
HWND hwnd,
UINT cidl,
PCUITEMID_CHILD_ARRAY *apidl,
IShellFolder *psf,
LPFNDFMCALLBACK lpfn,
UINT nKeys,
const HKEY *ahkeyClsKeys,
IContextMenu **ppcm
);
Parameters

pidlFolder
[in] An ITEMIDLIST structure for the parent folder.
这个父文件夹的一个ITEMIDLIST结构体。
hwnd
[in] A handle to the parent window.
一个句柄指向父窗口。
cidl
[in] The number of ITEMIDLIST structures in the array pointed to by apidl.
在数组中通过apidl指定ITEMIDLIST结构体的数量。
apidl
[in] An array of ITEMIDLIST structures, one for each item that is selected.
一个ITEMIDLIST结构体数组,选择每一个元素。
psf
[in] A pointer to the parent folder's IShellFolder interface.
一个指向父文件夹的IShellFolder接口。
This IShellFolder must support the IDataObject interface.
这个IShellFolder必须支持IDataObject接口。
If it does not, CDefFolderMenu_Create2 fails, returning E_NOINTERFACE.
如果不是,CDefFolderMenu_Create2失败,返回E_NOINTERFACE。
lpfn
[in] A pointer to a LPFNDFMCALLBACK call back function.
一个指向LPFNDFMCALLBACK的回调函数。
nKeys
[in] The number of keys in the array pointed to by ahkeyClsKeys.
在数组中通过ahkeyClsKeys指定的keys的数量。
ahkeyClsKeys
[in] An array of registry keys that specify the context menu handlers used with the menu's entries.
一个注册表键的数组用菜单的入口指定上下文菜单句柄。
For more information on context menu handlers, see Creating Context Menu Handlers.
更多信息在上下文菜单句柄上,请看Creating Context Menu Handlers。
ppcm
[out] A pointer to an IContextMenu interface for the context menu.
一个指向IContextMenu接口的上下文菜单。
Return Value
Returns S_OK if successful, or a Component Object Model (COM) error code otherwise.
如果成功返回S_OK,或否则是一个组件对象模型(COM)错误代码。
Function Information

Minimum DLL Version shell32.dll version 5.00 or later
Custom Implementation No
Header shlobj.h
Import library shell32.lib
Minimum operating systems Windows 2000, Windows Millennium Edition

See Also

SHCreateDefaultContextMenu

0 0
原创粉丝点击