1 /* 2 * PROJECT: sendmail 3 * LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+) 4 * PURPOSE: DeskLink implementation 5 * COPYRIGHT: Copyright 2019 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com) 6 */ 7 8 #ifndef _CDESKLINKDROPHANDLER_HPP_ 9 #define _CDESKLINKDROPHANDLER_HPP_ 10 11 #include "resource.h" 12 13 class CDeskLinkDropHandler : 14 public CComCoClass<CDeskLinkDropHandler, &CLSID_DeskLinkDropHandler>, 15 public CComObjectRootEx<CComMultiThreadModelNoCS>, 16 public IDropTarget, 17 public IPersistFile 18 { 19 public: 20 CDeskLinkDropHandler(); 21 ~CDeskLinkDropHandler(); 22 23 // IDropTarget 24 STDMETHODIMP DragEnter(IDataObject *pDataObject, DWORD dwKeyState, 25 POINTL pt, DWORD *pdwEffect); 26 STDMETHODIMP DragOver(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); 27 STDMETHODIMP DragLeave(); 28 STDMETHODIMP Drop(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, 29 DWORD *pdwEffect); 30 31 // IPersist 32 STDMETHODIMP GetClassID(CLSID *lpClassId); 33 34 // IPersistFile 35 STDMETHODIMP GetCurFile(LPOLESTR *ppszFileName); 36 STDMETHODIMP IsDirty(); 37 STDMETHODIMP Load(LPCOLESTR pszFileName, DWORD dwMode); 38 STDMETHODIMP Save(LPCOLESTR pszFileName, BOOL fRemember); 39 STDMETHODIMP SaveCompleted(LPCOLESTR pszFileName); 40 41 DECLARE_REGISTRY_RESOURCEID(IDR_DESKLINK) 42 DECLARE_NOT_AGGREGATABLE(CDeskLinkDropHandler) 43 44 DECLARE_PROTECT_FINAL_CONSTRUCT() 45 46 BEGIN_COM_MAP(CDeskLinkDropHandler) 47 COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) 48 COM_INTERFACE_ENTRY_IID(IID_IPersistFile, IPersistFile) 49 COM_INTERFACE_ENTRY_IID(IID_IDropTarget, IDropTarget) 50 END_COM_MAP() 51 }; 52 53 #endif /* _CDESKLINKDROPHANDLER_HPP_ */ 54