资源说明:CListCtrl功能的全部应用
void CListDemoDlg::OnLvnBegindragListFolder(NMHDR *pNMHDR, LRESULT *pResult)
{
if(m_listFolder.GetListType()!=TYPE_PICNOTIP && m_listFolder.GetListType() != TYPE_PICTIP)
return;
static int i = 0;
TRACE("Draging %d\r\n", i++);
LVITEM itemInfo;
LPNMLISTVIEW pNMLV = reinterpret_cast(pNMHDR);
itemInfo.mask = LVIF_IMAGE;
itemInfo.iItem = pNMLV->iItem;
itemInfo.iSubItem = 0;
m_listFolder.GetItem(&itemInfo);
DWORD dwState;
dwState = m_listFolder.m_arrayItemState.GetAt(pNMLV->iItem);
dwState &= ~PICITEMSTATE_MOUSEOVER;
dwState |= PICITEMSTATE_DRAG;
m_listFolder.m_arrayItemState.SetAt(pNMLV->iItem, dwState);
m_listFolder.Invalidate();
m_lvDragItem = *pNMLV;
m_lvDragItem.iSubItem = itemInfo.iImage;
m_listFolder.ClientToScreen(&m_lvDragItem.ptAction);
SetTimer(TIMER_DRAG, 0, 0);
*pResult = 0;
}
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。