I write an ATL project like logomarkersymbol. I want to read polyline data in Draw function , I use IPointCollectionPtr to read, but failed, the pointcollection is empty. Why???
my code is :
IPolylinePtr spPolyline(Geometry);
IGeometryCollectionPtr spGeometryCollection(spPolyline);
if(NULL == spGeometryCollection)
return E_FAIL;
long nGeos=0;
spGeometryCollection->get_GeometryCount(&nGeos);
for (i=0;i<nGeos;i++)
{
IGeometryPtr spGeometry;
spGeometryCollection->get_Geometry(i, &spGeometry);
IPointCollectionPtr spCollection(spGeometry);
long nPoints=0;
nPoints = spPointCollection->get_PointCount(&nPoints);
//spPolyline, spGeometry and spPointCollection has values, but npoint is empty. why???
??????
}