Ejemplo n.º 1
0
BOOL CEx_DrawView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) 
{
    // TODO: Add your message handler code here and/or call default
    BOOL bResult = FALSE;
    GraphicHitTest(m_ptCursor, bResult, m_iTrackID);
    
    if ((bResult || (m_bLButtonDown && m_pMoveTarget != NULL)) && GetDocument()->m_GM.m_DrawType == SELECT && !m_bContextMenu)
    {
        BOOL bRet = FALSE;
        CGraphic* P = Convert_To_Graphic(GetDocument()->m_obArray[m_iTrackID]);
		ASSERT_VALID(P);
        LPCTSTR cursor = P->HitSizingTest(m_ptCursor, bRet);
        if (bRet) { SetCursor(AfxGetApp()->LoadStandardCursor(cursor)); return TRUE; }
        SetCursor(AfxGetApp()->LoadStandardCursor(IDC_SIZEALL));
        return TRUE;
    }
    
	return CScrollView::OnSetCursor(pWnd, nHitTest, message);
}