FileDropTarget.cpp

00001 /* 
00002  *      Copyright (C) 2003-2005 Gabest
00003  *      http://www.gabest.org
00004  *
00005  *  This Program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2, or (at your option)
00008  *  any later version.
00009  *   
00010  *  This Program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  *  GNU General Public License for more details.
00014  *   
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with GNU Make; see the file COPYING.  If not, write to
00017  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
00018  *  http://www.gnu.org/copyleft/gpl.html
00019  *
00020  */
00021 
00022 // FileDropTarget.cpp : implementation file
00023 //
00024 
00025 #include "stdafx.h"
00026 #include "mplayerc.h"
00027 #include "FileDropTarget.h"
00028 
00029 
00030 // CFileDropTarget
00031 
00032 //IMPLEMENT_DYNAMIC(CFileDropTarget, COleDropTarget)
00033 CFileDropTarget::CFileDropTarget(CDropTarget* pDropTarget)
00034         : m_pDropTarget(pDropTarget)
00035 {
00036         ASSERT(m_pDropTarget);
00037 }
00038 
00039 CFileDropTarget::~CFileDropTarget()
00040 {
00041 }
00042 
00043 DROPEFFECT CFileDropTarget::OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point)
00044 {
00045         return m_pDropTarget ? m_pDropTarget->OnDragEnter(pDataObject, dwKeyState, point) : DROPEFFECT_NONE;
00046 }
00047 
00048 DROPEFFECT CFileDropTarget::OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point)
00049 {
00050         return m_pDropTarget ? m_pDropTarget->OnDragOver(pDataObject, dwKeyState, point) : DROPEFFECT_NONE;
00051 }
00052 
00053 BOOL CFileDropTarget::OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point)
00054 {
00055         return m_pDropTarget ? m_pDropTarget->OnDrop(pDataObject, dropEffect, point) : DROPEFFECT_NONE;
00056 }
00057 
00058 DROPEFFECT CFileDropTarget::OnDropEx(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropDefault, DROPEFFECT dropList, CPoint point)
00059 {
00060         return m_pDropTarget ? m_pDropTarget->OnDropEx(pDataObject, dropDefault, dropList, point) : DROPEFFECT_NONE;
00061 }
00062 
00063 void CFileDropTarget::OnDragLeave(CWnd* pWnd)
00064 {
00065         if(m_pDropTarget) m_pDropTarget->OnDragLeave();
00066 }
00067 
00068 DROPEFFECT CFileDropTarget::OnDragScroll(CWnd* pWnd, DWORD dwKeyState, CPoint point)
00069 {
00070         return m_pDropTarget ? m_pDropTarget->OnDragScroll(dwKeyState, point) : DROPEFFECT_NONE;
00071 }
00072 
00073 BEGIN_MESSAGE_MAP(CFileDropTarget, COleDropTarget)
00074 END_MESSAGE_MAP()
00075 
00076 
00077 
00078 // CFileDropTarget message handlers

Generated on Tue Dec 13 14:46:50 2005 for guliverkli by  doxygen 1.4.5