本文整理汇总了C++中CImageList::DragLeave方法的典型用法代码示例。如果您正苦于以下问题:C++ CImageList::DragLeave方法的具体用法?C++ CImageList::DragLeave怎么用?C++ CImageList::DragLeave使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CImageList
的用法示例。
在下文中一共展示了CImageList::DragLeave方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void OnDrop( CPoint& point ){
if( m_bDragging )
{
::ReleaseCapture();
m_bDragging = FALSE;
m_pDragImage->DragLeave( CWnd::GetDesktopWindow() );
m_pDragImage->EndDrag();
CPoint pt(point);
ClientToScreen( &pt );
CWnd* pDropWnd = CWnd::WindowFromPoint( pt );
ASSERT(pDropWnd);
if( pDropWnd->IsKindOf(RUNTIME_CLASS(CTreeCtrl)) )
{
DropItemOnTree( (CTreeCtrl*)pDropWnd );
}
else
if( pDropWnd->IsKindOf(RUNTIME_CLASS(CListCtrl)) )
{
DropItemOnList( (CListCtrl*)pDropWnd );
}
}
}
示例2: OnMouseMove
void CSpiroView::OnMouseMove(UINT nFlags, CPoint point)
{
if (m_bMovingPencil || m_pFigureDrag != NULL) // the user is dragging the pencil location
{
CPoint ptWindow(point);
ClientToScreen(&ptWindow);
CRect rectWindow;
GetWindowRect(&rectWindow);
ptWindow.Offset(-rectWindow.left, -rectWindow.top);
CImageList* pImList = m_bMovingPencil? &GetApp()->m_imageList : m_pILDragFigure;
ENSURE(pImList != NULL);
if (m_bStartDrag)
{
ENSURE(m_pFigureDrag != NULL);
m_bStartDrag = false;
CSpiroRect rect;
m_pFigureDrag->GetBoundingRect(&rect);
rect.Scale(m_nZoomNumer, m_nZoomDenom);
CDC* pDC = GetDC();
ENSURE(pDC != NULL);
OnPrepareDC(pDC);
pDC->LPtoDP(&rect);
ReleaseDC(pDC);
rect.InflateRect(4, 4);
InvalidateRect(&rect);
pImList->DragLeave(this);
UpdateWindow();
pImList->DragEnter(this, ptWindow);
}
else
pImList->DragMove(ptWindow);
return;
}
CScrollView::OnMouseMove(nFlags, point);
}