Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

GridDropTarget.h

00001 
00002 // GridDropTarget.h : header file
00003 //
00004 // MFC Grid Control - Drag/Drop target implementation
00005 //
00006 // Written by Chris Maunder <cmaunder@mail.com>
00007 // Copyright (c) 1998-2002. All Rights Reserved.
00008 //
00009 // This code may be used in compiled form in any way you desire. This
00010 // file may be redistributed unmodified by any means PROVIDING it is 
00011 // not sold for profit without the authors written consent, and 
00012 // providing that this notice and the authors name and all copyright 
00013 // notices remains intact. 
00014 //
00015 // An email letting me know how you are using it would be nice as well. 
00016 //
00017 // This file is provided "as is" with no expressed or implied warranty.
00018 // The author accepts no liability for any damage/loss of business that
00019 // this product may cause.
00020 //
00021 // For use with CGridCtrl v2.10+
00022 //
00024 
00025 #if !defined(AFX_GRIDDROPTARGET_H__5C610981_BD36_11D1_97CD_00A0243D1382__INCLUDED_)
00026 #define AFX_GRIDDROPTARGET_H__5C610981_BD36_11D1_97CD_00A0243D1382__INCLUDED_
00027 
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031 
00032 
00033 #include <afxole.h>
00034 
00035 class CGridCtrl;
00036 
00038 // CGridDropTarget command target
00039 
00040 class CGridDropTarget : public COleDropTarget
00041 {
00042 public:
00043     CGridDropTarget();
00044     virtual ~CGridDropTarget();
00045 
00046 // Attributes
00047 public:
00048     CGridCtrl* m_pGridCtrl;
00049     BOOL       m_bRegistered;
00050 
00051 // Operations
00052 public:
00053     BOOL Register(CGridCtrl *pGridCtrl);
00054     virtual void Revoke();
00055 
00056     BOOL        OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
00057     DROPEFFECT  OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
00058     void        OnDragLeave(CWnd* pWnd);
00059     DROPEFFECT  OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
00060     DROPEFFECT  OnDragScroll(CWnd* pWnd, DWORD dwKeyState, CPoint point);
00061 
00062 // Overrides
00063     // ClassWizard generated virtual function overrides
00064     //{{AFX_VIRTUAL(CGridDropTarget)
00065     //}}AFX_VIRTUAL
00066 
00067 // Implementation
00068 protected:
00069 
00070     // Generated message map functions
00071     //{{AFX_MSG(CGridDropTarget)
00072     //}}AFX_MSG
00073 
00074     DECLARE_MESSAGE_MAP()
00075 };
00076 
00078 
00079 //{{AFX_INSERT_LOCATION}}
00080 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00081 
00082 #endif // !defined(AFX_GRIDDROPTARGET_H__5C610981_BD36_11D1_97CD_00A0243D1382__INCLUDED_)

Generated on Tue Feb 17 02:03:04 2004 for harlem by doxygen 1.3.6