Reactos
1/*
2 * file system folder
3 *
4 * Copyright 1997 Marcus Meissner
5 * Copyright 1998, 1999, 2002 Juergen Schmied
6 * Copyright 2009 Andrew Hill
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 */
22
23#ifndef _DRAGDROPHELPER_H_
24#define _DRAGDROPHELPER_H_
25
26class CDropTargetHelper :
27 public CComCoClass<CDropTargetHelper, &CLSID_DragDropHelper>,
28 public CComObjectRootEx<CComMultiThreadModelNoCS>,
29 public IDragSourceHelper,
30 public IDropTargetHelper
31{
32private:
33public:
34 CDropTargetHelper();
35 ~CDropTargetHelper();
36
37 virtual HRESULT WINAPI InitializeFromBitmap(LPSHDRAGIMAGE pshdi, IDataObject *pDataObject);
38 virtual HRESULT WINAPI InitializeFromWindow(HWND hwnd, POINT *ppt, IDataObject *pDataObject);
39
40 STDMETHOD(DragEnter)(HWND hwndTarget, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) override;
41 STDMETHOD(DragLeave)() override;
42 STDMETHOD(DragOver)(POINT *ppt, DWORD dwEffect) override;
43 STDMETHOD(Drop)(IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) override;
44 STDMETHOD(Show)(BOOL fShow) override;
45
46DECLARE_REGISTRY_RESOURCEID(IDR_DRAGDROPHELPER)
47DECLARE_NOT_AGGREGATABLE(CDropTargetHelper)
48
49DECLARE_PROTECT_FINAL_CONSTRUCT()
50
51BEGIN_COM_MAP(CDropTargetHelper)
52 COM_INTERFACE_ENTRY_IID(IID_IDragSourceHelper, IDragSourceHelper)
53 COM_INTERFACE_ENTRY_IID(IID_IDropTargetHelper, IDropTargetHelper)
54END_COM_MAP()
55};
56
57#endif /* _DRAGDROPHELPER_H_ */