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.

61 lines
1.9 KiB

  1. #ifndef _ATTMENU_H
  2. #define _ATTMENU_H
  3. interface IOleCommandTarget;
  4. class CAttMenu
  5. {
  6. public:
  7. CAttMenu();
  8. ~CAttMenu();
  9. ULONG AddRef();
  10. ULONG Release();
  11. HRESULT Init(IMimeMessage *pMsg, IFontCache *pFntCache, IOleInPlaceFrame *pFrame, IOleCommandTarget *pHostCmdTarget);
  12. HRESULT HasAttach();
  13. HRESULT HasEnabledAttach();
  14. HRESULT Show(HWND hwnd, LPPOINT ppt, BOOL fRightClick);
  15. HRESULT HasVCard();
  16. HRESULT LaunchVCard(HWND hwnd);
  17. static LRESULT ExtSubClassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  18. private:
  19. HMENU m_hMenu;
  20. ULONG m_cRef,
  21. m_uVerb,
  22. m_cAttach,
  23. m_cVisibleAttach,
  24. m_cEnabledAttach;
  25. BOOL m_fAllowUnsafe;
  26. int m_cxMaxText;
  27. HCHARSET m_hCharset;
  28. IFontCache *m_pFntCache;
  29. IOleInPlaceFrame *m_pFrame;
  30. IOleCommandTarget *m_pHostCmdTarget;
  31. WNDPROC m_pfnWndProc;
  32. IMimeMessage *m_pMsg;
  33. BOOL m_fShowingMenu;
  34. LPATTACHDATA m_pAttachVCard;
  35. HBODY m_hVCard;
  36. HBODY *m_rghAttach;
  37. HRESULT BuildMenu();
  38. HRESULT DestroyMenu(HMENU hMenu);
  39. HRESULT OnMeasureItem(HWND hwnd, LPMEASUREITEMSTRUCT lpmis);
  40. HRESULT OnDrawItem(HWND hwnd, LPDRAWITEMSTRUCT lpdis);
  41. HRESULT OnMenuSelect(HWND hwnd, WPARAM wParam, LPARAM lParam);
  42. HRESULT GetItemTextExtent(HWND hwnd, LPWSTR szDisp, LPSIZE pSize);
  43. HRESULT SubClassWindow(HWND hwnd, BOOL fOn);
  44. HRESULT FindItem(int idm, BOOL fByPos, LPATTACHDATA *ppAttach);
  45. HRESULT HrSaveAll(HWND hwnd);
  46. HRESULT ScanForAttachmentCount();
  47. };
  48. typedef CAttMenu *LPATTMENU;
  49. HRESULT SaveAttachmentsWithPath(HWND hwnd, IOleCommandTarget *pCmdTarget, IMimeMessage *pMsg);
  50. #endif // _ATTMENU_H