2 * file system folder drop target
4 * Copyright 1997 Marcus Meissner
5 * Copyright 1998, 1999, 2002 Juergen Schmied
6 * Copyright 2009 Andrew Hill
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.
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.
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
23 #ifndef _CFSDROPTARGET_H_
24 #define _CFSDROPTARGET_H_
26 WCHAR
*BuildPathsList(LPCWSTR wszBasePath
, int cidl
, LPCITEMIDLIST
*pidls
);
29 public CComObjectRootEx
<CComMultiThreadModelNoCS
>,
33 UINT cfShellIDList
; /* clipboardformat for IDropTarget */
34 BOOL fAcceptFmt
; /* flag for pending Drop */
37 BOOL
QueryDrop (DWORD dwKeyState
, LPDWORD pdwEffect
);
38 virtual HRESULT WINAPI
_DoDrop(IDataObject
*pDataObject
, DWORD dwKeyState
, POINTL pt
, DWORD
*pdwEffect
);
39 virtual HRESULT WINAPI
CopyItems(IShellFolder
*pSFFrom
, UINT cidl
, LPCITEMIDLIST
*apidl
, BOOL bCopy
);
40 BOOL
GetUniqueFileName(LPWSTR pwszBasePath
, LPCWSTR pwszExt
, LPWSTR pwszTarget
, BOOL bShortcut
);
41 static DWORD WINAPI
_DoDropThreadProc(LPVOID lpParameter
);
46 HRESULT WINAPI
Initialize(LPWSTR PathTarget
);
49 virtual HRESULT WINAPI
DragEnter(IDataObject
*pDataObject
, DWORD dwKeyState
, POINTL pt
, DWORD
*pdwEffect
);
50 virtual HRESULT WINAPI
DragOver(DWORD dwKeyState
, POINTL pt
, DWORD
*pdwEffect
);
51 virtual HRESULT WINAPI
DragLeave();
52 virtual HRESULT WINAPI
Drop(IDataObject
*pDataObject
, DWORD dwKeyState
, POINTL pt
, DWORD
*pdwEffect
);
54 DECLARE_NOT_AGGREGATABLE(CFSDropTarget
)
56 DECLARE_PROTECT_FINAL_CONSTRUCT()
58 BEGIN_COM_MAP(CFSDropTarget
)
59 COM_INTERFACE_ENTRY_IID(IID_IDropTarget
, IDropTarget
)
72 HRESULT
CFSDropTarget_CreateInstance(LPWSTR sPathTarget
, REFIID riid
, LPVOID
* ppvOut
);
74 #endif /* _CFSFOLDER_H_ */