重载捕捉函数出错
AcGePoint3d CMARectWindow::startPt() {
assertReadEnabled(); return m_startPt; }
Acad::ErrorStatus CMARectWindow::getOsnapPoints(AcDb::OsnapMode osnapMode, int gsSelectionMark,const AcGePoint3d& pickPoint, const AcGePoint3d& lastPoint,const AcGeMatrix3d& viewXform, AcGePoint3dArray& snapPoints,AcDbIntArray& geomIds) const { assertReadEnabled();
Acad::ErrorStatus es=Acad::eOk ; if (gsSelectionMark == 0) return es; if (osnapMode != AcDb::kOsModeIns) return es;
AcGePoint3d pt; //插入点
pt = startPt(); //这里出错了,信息如下 snapPoints.append( pt );
return es;
}
你在worldDraw里是这样 pt = startPt() 调用点的,为什么在这里调用会出错?
error C2662: “CMARectWindow::startPt” : 不能将“this”指针从“const CMARectWindow”转换为“CMARectWindow & |