📄 contextmenusample.h
字号:
#if !defined(AFX_CONTEXTMENUSAMPLE_H__5F5F7E71_ADC6_11D3_AF23_AC9F5AA57808__INCLUDED_)
#define AFX_CONTEXTMENUSAMPLE_H__5F5F7E71_ADC6_11D3_AF23_AC9F5AA57808__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ContextMenuSample.h : header file
//
#include <shlobj.h>
/////////////////////////////////////////////////////////////////////////////
// CContextMenuSample command target
class CContextMenuSample : public CCmdTarget
{
DECLARE_DYNCREATE(CContextMenuSample)
CContextMenuSample(); // protected constructor used by dynamic creation
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CContextMenuSample)
public:
virtual void OnFinalRelease();
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CContextMenuSample();
// Generated message map functions
//{{AFX_MSG(CContextMenuSample)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Generated OLE dispatch map functions
//{{AFX_DISPATCH(CContextMenuSample)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_DISPATCH
DECLARE_DISPATCH_MAP()
DECLARE_OLECREATE(CContextMenuSample)
//支持COM接口映射
DECLARE_INTERFACE_MAP()
//BEGIN_INTERFACE_PART(类名,接口名)
//开始定义接口类
//不必要加入IUnknown接口方法,IUnknown接口方法可自动加入类中
BEGIN_INTERFACE_PART(CMS,IContextMenu)
STDMETHOD(QueryContextMenu)(HMENU hmenu,
UINT indexMenu,
UINT idCmdFirst,
UINT idCmdLast,
UINT uFlags);
STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
STDMETHOD(GetCommandString)(UINT idCmd,
UINT uType,
UINT * pwReserved,
LPSTR pszName,
UINT cchMax);
END_INTERFACE_PART(CMS)
//
//BEGIN_INTERFACE_PART(类名,接口名)
//开始定义接口类
BEGIN_INTERFACE_PART(SEI,IShellExtInit)
STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder,
LPDATAOBJECT lpdobj,
HKEY hkeyProgID);
END_INTERFACE_PART(SEI)
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CONTEXTMENUSAMPLE_H__5F5F7E71_ADC6_11D3_AF23_AC9F5AA57808__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -