資源簡介
Redrain仿酷狗播放器 duilib 有資源文件 vs10(sp1)可調(diào)戲
代碼片段和文件信息
#include?“duilib.h“
CDropTargetEx::CDropTargetEx(CframeWnd?*pMainWnd):
m_pMainWnd(pMainWnd)
tb_RefCount(0)
m_hTargetWnd(0)
m_AcceptKeyState(0)
m_piDropHelper(NULL)
m_bUseDnDHelper(false)
m_pDropCallBack(NULL)
{
//?Create?an?instance?of?the?shell?DnD?helper?object.
if?(?SUCCEEDED(?CoCreateInstance?(?CLSID_DragDropHelper?NULL?
CLSCTX_INPROC_SERVER
IID_IDropTargetHelper?
(void**)?&m_piDropHelper?)?))
{
m_bUseDnDHelper?=?true;
}
}
CDropTargetEx::~CDropTargetEx()
{
if?(?NULL?!=?m_piDropHelper?)
m_piDropHelper->Release();
}
BOOL?CDropTargetEx::DragDropRegister(HWND?hWnd DWORD?AcceptKeyState)
{
if(!IsWindow(hWnd))return?false;
HRESULT?s?=?::RegisterDragDrop?(hWndthis);
if(SUCCEEDED(s))
{?
m_hTargetWnd?=?hWnd;
m_AcceptKeyState?=?AcceptKeyState;?
if?(m_pMainWnd->GetLeftListPos(m_rcList))
return?true;
return?false;
}
else?
{?
return?false;?
}
}
HRESULT?STDMETHODCALLTYPE?CDropTargetEx::QueryInterface(REFIID?iid?void?**?ppvobject)
{
*ppvobject?=?NULL;
if?(iid?==?IID_IDropTarget)
*ppvobject?=?static_cast(this);
if(?*ppvobject?!=?NULL?)
AddRef();
return?*ppvobject?==?NULL???E_NOINTERFACE?:?S_OK;
}
ULONG?STDMETHODCALLTYPE?CDropTargetEx::AddRef(void)
{
InterlockedIncrement(&tb_RefCount);?
return?tb_RefCount;
}
ULONG?STDMETHODCALLTYPE?CDropTargetEx::Release(void)
{
ULONG?ulRefCount?=?InterlockedDecrement(&tb_RefCount);
return?ulRefCount;?
}
HRESULT?STDMETHODCALLTYPE?CDropTargetEx::DragOver(DWORD?grfKeyStatePOINTL?pt DWORD?*pdwEffect)
{
ScreenToClient(m_hTargetWnd?(LPPOINT)&pt);
if(?grfKeyState?!=?m_AcceptKeyState?||?pt.x??m_rcList.right?||?pt.y??m_rcList.bottom)
{
*pdwEffect?=?DROPEFFECT_NONE;
}
else
{
*pdwEffect?=?DROPEFFECT_COPY?;
}
if?(?m_bUseDnDHelper?)
{
m_piDropHelper->DragOver((LPPOINT)&pt?*pdwEffect);
}
return?S_OK;
}
HRESULT?STDMETHODCALLTYPE?CDropTargetEx::DragEnter(IDataobject?*?pDataobjectDWORD?grfKeyState?POINTL?pt DWORD?*?pdwEffect)
{
if(?grfKeyState?!=?m_AcceptKeyState?)
{
*pdwEffect?=?DROPEFFECT_NONE;
return?S_OK;
}
//我這里只關(guān)心CE_HDROP類型,如果需要,可以調(diào)用EnumDragData函數(shù)來枚舉所有類型
FORMATETC?cFmt?=?{(CLIPFORMAT)?CF_HDROP?NULL?DVASPECT_CONTENT?-1?TYMED_HGLOBAL};
GetDragData(pDataobject?cFmt);
*pdwEffect?=?DROPEFFECT_COPY;
if?(?m_bUseDnDHelper?)
{
m_piDropHelper->DragEnter?(?m_hTargetWnd?pDataobject?(LPPOINT)&pt?*pdwEffect?);
}
return?S_OK;
}
HRESULT?STDMETHODCALLTYPE?CDropTargetEx::DragLeave(void)
{
int?temp?=?m_Array.size();
for(UINT?i?=?0;i? {
LPDRAGDATA?pData?=?m_Array[i];
::ReleaseStgMedium(&pData->stgMedium);
delete?pData;
m_Array.clear();
}
if?(?m_bUseDnDHelper?)
{
m_piDropHelper->DragLeave();
}
return?S_OK;
}
HRESULT?STDMETHODCALLTYPE?CDropTargetEx::Drop(IDataobject?*pDataObjDWORD?grfKeyState
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3081??2014-07-24?13:15??Redrain仿酷狗播放器\cloneKuGou\cloneKuGou.filters
?????文件????????143??2014-05-03?09:31??Redrain仿酷狗播放器\cloneKuGou\cloneKuGou.user
?????文件???????4421??2014-07-31?08:38??Redrain仿酷狗播放器\cloneKuGou\cloneKuGou.vcproj
?????文件???????8306??2014-11-12?07:40??Redrain仿酷狗播放器\cloneKuGou\cloneKuGou.vcxproj
?????文件???????6544??2014-11-12?07:40??Redrain仿酷狗播放器\cloneKuGou\cloneKuGou.vcxproj.filters
?????文件????????143??2016-08-30?08:07??Redrain仿酷狗播放器\cloneKuGou\cloneKuGou.vcxproj.user
?????文件???????5409??2014-09-09?08:31??Redrain仿酷狗播放器\cloneKuGou\ControlNames.h
?????文件???????6163??2014-09-01?09:09??Redrain仿酷狗播放器\cloneKuGou\Controls\PopupWidget.cpp
?????文件???????2110??2014-09-08?15:34??Redrain仿酷狗播放器\cloneKuGou\Controls\PopupWidget.h
?????文件???????2252??2016-12-11?11:54??Redrain仿酷狗播放器\cloneKuGou\Controls\SkinPickerPictureItem.cpp
?????文件???????1485??2014-08-11?14:12??Redrain仿酷狗播放器\cloneKuGou\Controls\SkinPickerPictureItem.h
?????文件??????12177??2014-08-26?21:32??Redrain仿酷狗播放器\cloneKuGou\Controls\UIColorPalette.cpp
?????文件???????2426??2014-08-24?07:04??Redrain仿酷狗播放器\cloneKuGou\Controls\UIColorPalette.h
?????文件????????934??2014-09-01?10:26??Redrain仿酷狗播放器\cloneKuGou\Controls\UIHotButton.cpp
?????文件????????428??2014-09-01?10:23??Redrain仿酷狗播放器\cloneKuGou\Controls\UIHotButton.h
?????文件??????28024??2016-12-07?12:42??Redrain仿酷狗播放器\cloneKuGou\Controls\UIMenu.cpp
?????文件???????7043??2016-12-06?08:52??Redrain仿酷狗播放器\cloneKuGou\Controls\UIMenu.h
?????文件??????23575??2016-12-28?14:19??Redrain仿酷狗播放器\cloneKuGou\Controls\UIMusicList.cpp
?????文件???????4434??2016-08-30?12:38??Redrain仿酷狗播放器\cloneKuGou\Controls\UIMusicList.h
?????文件???????2565??2014-08-27?23:03??Redrain仿酷狗播放器\cloneKuGou\Controls\UIRadioList.cpp
?????文件???????1553??2014-08-27?16:08??Redrain仿酷狗播放器\cloneKuGou\Controls\UIRadioList.h
?????文件?????????88??2016-12-11?11:58??Redrain仿酷狗播放器\cloneKuGou\Debug\cloneKuGou.lastbuildstate
?????文件????????823??2016-12-26?14:20??Redrain仿酷狗播放器\cloneKuGou\Debug\cloneKuGou.vcxprojResolveAssemblyReference.cache
?????文件??????35784??2016-09-01?07:24??Redrain仿酷狗播放器\cloneKuGou\Debug\Duilib.res
?????文件????????682??2016-09-01?07:24??Redrain仿酷狗播放器\cloneKuGou\Debug\Redrain音樂盒_d.exe.em
?????文件????????748??2016-09-01?07:24??Redrain仿酷狗播放器\cloneKuGou\Debug\Redrain音樂盒_d.exe.em
?????文件????????640??2016-12-11?11:58??Redrain仿酷狗播放器\cloneKuGou\Debug\Redrain音樂盒_d.exe.intermediate.manifest
?????文件????????214??2016-09-01?07:24??Redrain仿酷狗播放器\cloneKuGou\Debug\Redrain音樂盒_d_manifest.rc
?????文件???????5277??2014-09-09?12:55??Redrain仿酷狗播放器\cloneKuGou\DropTargetEx.cpp
?????文件???????1554??2014-09-08?13:50??Redrain仿酷狗播放器\cloneKuGou\DropTargetEx.h
............此處省略2493個文件信息
- 上一篇:免費學(xué)習(xí)opencv中文版
- 下一篇:CFA 一級 高頓教材
評論
共有 條評論