45464

来源:互联网 发布:新手如何装修淘宝店铺 编辑:程序博客网 时间:2024/06/08 19:06

void CFrameView::OnLButtonUp(UINT nFlags, CPoint point){

        if (!gl3d.bCanMove)
        {
            AfxMessageBox("请先归位后在拖动");
            return;
        }

}

void CFrameView::OnRButtonDown(UINT nFlags, CPoint point) {

    gl3d.bCanMove = false;

}

void CLineView::OnBTBeginDrag()
{
    // TODO: Add your control notification handler code here
    CFrameView* pView = (CFrameView*)GetFrameView();
    // 停止旋转
    if (pView->m_bRotate)
    {
        KillTimer(1);
        pView->m_bRotate = false;
    }
   
    // 旋转至某角度
    gl3d.m_RotateAngle = 15.0f;
    gl3d.bCanMove = true;

    // 刷新视图

    GetFrameView()->InvalidateRect(NULL,FALSE);
   
}

原创粉丝点击