Windows2003-3790/windows/feime/kor/ime2k/imm32/syshelp.h
2020-09-30 16:53:55 +02:00

57 lines
1.2 KiB
C++

//
// syshelp.h
//
#ifndef _SYSHELP_H_
#define _SYSHELP_H_
#include "msctf.h"
//
// CSysHelpSink
//
typedef HRESULT (*SYSHELPINITMENU)(void *pv, ITfMenu *pMenu);
typedef HRESULT (*SYSHELPMENUSELECT)(void *pv, UINT wID);
//////////////////////////////////////////////////////////////////////////////
//
// CSysHelpSink
//
//////////////////////////////////////////////////////////////////////////////
class CSysHelpSink : public ITfSystemLangBarItemSink
{
public:
CSysHelpSink(SYSHELPINITMENU pfnInitMenu, SYSHELPMENUSELECT pfnMenuSelect, void *pv);
~CSysHelpSink();
//
// IUnknown methods
//
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
STDMETHODIMP_(ULONG) AddRef(void);
STDMETHODIMP_(ULONG) Release(void);
//
// ITfSource
//
STDMETHODIMP InitMenu(ITfMenu *pMenu);
STDMETHODIMP OnMenuSelect(UINT wID);
HRESULT _Advise(ITfLangBarItemMgr *plbimgr, REFGUID rguid);
HRESULT _Unadvise(ITfLangBarItemMgr *plbimgr);
private:
SYSHELPINITMENU _pfnInitMenu;
SYSHELPMENUSELECT _pfnMenuSelect;
DWORD _dwCookie;
void *_pv;
GUID _guid;
long _cRef;
};
#endif // _SYSHELP_H_