阅读:1372回复:1
请教一个绘图的问题
<STRONG> 以下代码我在绘圆的时候,老是添加不上去,希望高手帮我看看,问题到达在哪里?多谢</STRONG><BR><STRONG>CMapXPoint point;<BR> point.CreateDispatch(point.GetClsid());<BR> CMapXFeature feature;<BR> CMapXPoints points;<BR> points.CreateDispatch(points.GetClsid());<BR> CMapXRectangle rect;<BR> rect.CreateDispatch(rect.GetClsid());<BR> switch(ToolNum)<BR> {<BR> case CUSTOM_DRAW_LINE_TOOL:<BR> {<BR> points.AddXY(X1,Y1);<BR> points.AddXY(X2,Y2);<BR> COleVariant vtPoints;<BR> vtPoints.vt=VT_DISPATCH;<BR> vtPoints.pdispVal=points.m_lpDispatch;<BR> vtPoints.pdispVal->AddRef();<BR> feature=cFactory.CreateLine(vtPoints);<BR> layer.AddFeature(feature);<BR> }<BR> break;<BR> case CUSTOM_DRAW_CIRCLE_TOOL:<BR> {<BR> points.AddXY(X2,Y2);<BR> COleVariant vtPoints;<BR> vtPoints.vt=VT_DISPATCH;<BR> vtPoints.pdispVal=points.m_lpDispatch;<BR> vtPoints.pdispVal->AddRef();<BR> feature=cFactory.CreateCircularRegion(1,points,Distance,1);<BR> layer.AddFeature(feature);<BR> }<BR> break;<BR> }</STRONG>
|
|
1楼#
发布于:2005-09-25 10:44
好失望哟,发了这么多天,连一个哥哥\姐姐来帮忙的都没有!!
|
|