DropSource.h
上传用户:hy_wanghao
上传日期:2007-01-08
资源大小:279k
文件大小:1k
- #if !defined(AFX_DROPSOURCE_H__20001226_C21E_600E_0DDB_0080AD509054__INCLUDED_)
- #define AFX_DROPSOURCE_H__20001226_C21E_600E_0DDB_0080AD509054__INCLUDED_
- #pragma once
- //////////////////////////////////////////////////////////////////////////////
- // CDropSource
- class ATL_NO_VTABLE CDropSource :
- public CComObjectRootEx<CComSingleThreadModel>,
- public IDropSource
- {
- public:
- DECLARE_NOT_AGGREGATABLE(CDropSource)
- BEGIN_COM_MAP(CDropSource)
- COM_INTERFACE_ENTRY_IID(IID_IDropSource,IDropSource)
- END_COM_MAP()
- // IDropSource
- public:
- STDMETHOD(QueryContinueDrag)(BOOL bEsc, DWORD dwKeyState)
- {
- if( bEsc ) return ResultFromScode(DRAGDROP_S_CANCEL);
- if( (dwKeyState & MK_LBUTTON)==0 ) return ResultFromScode(DRAGDROP_S_DROP);
- return S_OK;
- }
- STDMETHOD(GiveFeedback)(DWORD)
- {
- return ResultFromScode(DRAGDROP_S_USEDEFAULTCURSORS);
- }
- };
- #endif // !defined(AFX_DROPSOURCE_H__20001226_C21E_600E_0DDB_0080AD509054__INCLUDED_)