2 * Copyright (C) 2003-2006 Gabest
3 * http://www.gabest.org
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Make; see the file COPYING. If not, write to
17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 * http://www.gnu.org/copyleft/gpl.html
22 // FileDropTarget.cpp : implementation file
27 #include "FileDropTarget.h"
32 //IMPLEMENT_DYNAMIC(CFileDropTarget, COleDropTarget)
33 CFileDropTarget::CFileDropTarget(CDropTarget
* pDropTarget
)
34 : m_pDropTarget(pDropTarget
)
36 ASSERT(m_pDropTarget
);
39 CFileDropTarget::~CFileDropTarget()
43 DROPEFFECT
CFileDropTarget::OnDragEnter(CWnd
* pWnd
, COleDataObject
* pDataObject
, DWORD dwKeyState
, CPoint point
)
45 return m_pDropTarget
? m_pDropTarget
->OnDragEnter(pDataObject
, dwKeyState
, point
) : DROPEFFECT_NONE
;
48 DROPEFFECT
CFileDropTarget::OnDragOver(CWnd
* pWnd
, COleDataObject
* pDataObject
, DWORD dwKeyState
, CPoint point
)
50 return m_pDropTarget
? m_pDropTarget
->OnDragOver(pDataObject
, dwKeyState
, point
) : DROPEFFECT_NONE
;
53 BOOL
CFileDropTarget::OnDrop(CWnd
* pWnd
, COleDataObject
* pDataObject
, DROPEFFECT dropEffect
, CPoint point
)
55 return m_pDropTarget
? m_pDropTarget
->OnDrop(pDataObject
, dropEffect
, point
) : DROPEFFECT_NONE
;
58 DROPEFFECT
CFileDropTarget::OnDropEx(CWnd
* pWnd
, COleDataObject
* pDataObject
, DROPEFFECT dropDefault
, DROPEFFECT dropList
, CPoint point
)
60 return m_pDropTarget
? m_pDropTarget
->OnDropEx(pDataObject
, dropDefault
, dropList
, point
) : DROPEFFECT_NONE
;
63 void CFileDropTarget::OnDragLeave(CWnd
* pWnd
)
65 if(m_pDropTarget
) m_pDropTarget
->OnDragLeave();
68 DROPEFFECT
CFileDropTarget::OnDragScroll(CWnd
* pWnd
, DWORD dwKeyState
, CPoint point
)
70 return m_pDropTarget
? m_pDropTarget
->OnDragScroll(dwKeyState
, point
) : DROPEFFECT_NONE
;
73 BEGIN_MESSAGE_MAP(CFileDropTarget
, COleDropTarget
)
78 // CFileDropTarget message handlers