Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.1 KiB

  1. //
  2. // syslbar.h
  3. //
  4. #ifndef SYSLBAR_H
  5. #define SYSLBAR_H
  6. #include "ctfutb.h"
  7. #define IDSLB_INITMENU 1
  8. #define IDSLB_ONMENUSELECT 2
  9. typedef HRESULT (*SYSLBARCALLBACK)(UINT uCode, void *pv, ITfMenu *pMenu, UINT wID);
  10. //////////////////////////////////////////////////////////////////////////////
  11. //
  12. // CSystemLBarSink
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. class CSystemLBarSink : public ITfSystemLangBarItemSink
  16. {
  17. public:
  18. CSystemLBarSink(SYSLBARCALLBACK pfn, void *pv);
  19. ~CSystemLBarSink();
  20. //
  21. // IUnknown methods
  22. //
  23. STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
  24. STDMETHODIMP_(ULONG) AddRef(void);
  25. STDMETHODIMP_(ULONG) Release(void);
  26. //
  27. // ITfSource
  28. //
  29. STDMETHODIMP InitMenu(ITfMenu *pMenu);
  30. STDMETHODIMP OnMenuSelect(UINT wID);
  31. HRESULT _Advise(ITfThreadMgr *ptim, REFGUID rguid);
  32. HRESULT _Unadvise();
  33. private:
  34. SYSLBARCALLBACK _pfn;
  35. ITfThreadMgr *_ptim;
  36. DWORD _dwCookie;
  37. void *_pv;
  38. GUID _guid;
  39. long _cRef;
  40. };
  41. #endif // SYSLBAR_H