📄 commandfactory.h
字号:
////////////////////////////////////////////////////////////////////////////////
//
// File : CommandFactory.h
//
// Copyright (C) 2002 PGP Corporation
//
// ABSTRACT
// This interface is used to manage commands in GroupWise. A command occurs
// in multiple locations including the Menu and Toolbar.
//
// Author: Satya S. Das
//
////////////////////////////////////////////////////////////////////////////////
class CCommandFactory : public ICommandFactory
{
public:
//IUnknown methods
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj);
STDMETHOD_(ULONG, AddRef)(THIS)
{ return m_pUnkOuter->AddRef(); }
STDMETHOD_(ULONG, Release)(THIS)
{ return m_pUnkOuter->Release(); }
//ICommandFactory methods
STDMETHOD(BuildCommand)(THIS_ BSTR bstrContext, BSTR bstrPersistentID, IDispatch * pIDispBaseCommand, IDispatch * pIDispParameters, IDispatch * FAR* ppIDispGWCommand);
STDMETHOD(CustomizeContextMenu)(THIS_ BSTR bstrContext, IDispatch * pIDispGWMenu);
STDMETHOD(CustomizeMenu)(THIS_ BSTR bstrContext, IDispatch * pIDispGWMenu, VARIANT_BOOL FAR* pbChanged);
STDMETHOD(CustomizeToolbar)(THIS_ BSTR bstrContext, IDispatch * pIDispGWToolbar, VARIANT_BOOL FAR* pbChanged);
STDMETHOD(Init)(THIS_ long lcid, long FAR* plCmdFlags);
STDMETHOD(WantCommand)(THIS_ BSTR bstrContext, BSTR bstrPersistentID, VARIANT_BOOL FAR* pbChanged);
CCommandFactory(IUnknown *pUnk);
~CCommandFactory();
private:
IUnknown *m_pUnkOuter;
IUnknown *m_pIUnkDispFact;
STDMETHOD(InternalAddMenuItem)(UINT uiMenuItemStringId,
IGWMenuItems *pigwmParentMenuItems, int iMenuCommandId,
DWORD dwMenuUIOptions, UINT uiMenuItemHlpStringId=NULL);
STDMETHOD(InternalAddToolbarItem)(IGWToolbarItems *pigwtToolBar,
char *pszIconIdString, UINT uiToolHlpStrId,
DWORD dwToolUIOptions,int iToolCommandId);
};
#define IDC_ODMA_ATTACH 0 // Constant for Custom menu item New Menu Item
#define IDB_ODMA_ATTACH 1 // constant for Toolbar button New button
#define IDM_ODMA_ATTACH 2 // constant for Context menu item This is a new menu Item
#define CMD_COMPOSE 3 // Constant for the compose command we'll create.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -