reactos/dll/shellext/mydocs/CMyDocsDropHandler.hpp
Katayama Hirofumi MZ 4efff7f463
[SHELLEXT][MYDOCS][INF] Add mydocs.dll and .mydocs file extension (#2624)
I found "SendTo My Documents" is realized by .mydocs filename extension in WinXP/2k3. To implement this, I will add mydocs.dll file. CORE-12562
2020-04-22 19:34:15 +09:00

51 lines
1.6 KiB
C++

/*
* PROJECT: mydocs
* LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+)
* PURPOSE: MyDocs implementation
* COPYRIGHT: Copyright 2020 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
*/
#pragma once
#include "resource.h"
class CMyDocsDropHandler :
public CComCoClass<CMyDocsDropHandler, &CLSID_MyDocsDropHandler>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
public IDropTarget,
public IPersistFile
{
public:
CMyDocsDropHandler();
~CMyDocsDropHandler();
// IDropTarget
STDMETHODIMP DragEnter(IDataObject *pDataObject, DWORD dwKeyState,
POINTL pt, DWORD *pdwEffect);
STDMETHODIMP DragOver(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect);
STDMETHODIMP DragLeave();
STDMETHODIMP Drop(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt,
DWORD *pdwEffect);
// IPersist
STDMETHODIMP GetClassID(CLSID *lpClassId);
// IPersistFile
STDMETHODIMP GetCurFile(LPOLESTR *ppszFileName);
STDMETHODIMP IsDirty();
STDMETHODIMP Load(LPCOLESTR pszFileName, DWORD dwMode);
STDMETHODIMP Save(LPCOLESTR pszFileName, BOOL fRemember);
STDMETHODIMP SaveCompleted(LPCOLESTR pszFileName);
DECLARE_REGISTRY_RESOURCEID(IDR_MYDOCS)
DECLARE_NOT_AGGREGATABLE(CMyDocsDropHandler)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CMyDocsDropHandler)
COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
COM_INTERFACE_ENTRY_IID(IID_IPersistFile, IPersistFile)
COM_INTERFACE_ENTRY_IID(IID_IDropTarget, IDropTarget)
END_COM_MAP()
};