Alberto071397
asked on
Can the CArray class be used with the function Polyline?
It seems that the function Polyline doesn't accept as its first argument a CArray collection of CPoints. I wrote a program in which Polyline is used with a common array and it works fine, but if a CArray class is used instead, the program doesn't compile and gives the following message: cannot convert from 'class CArray<class CPoint,class CPoint &> *' to 'class CPoint *'.
Is there a way to make Polyline use the CArray class?
Is there a way to make Polyline use the CArray class?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It wasn't necessary to use POINT; CArray<CPoint, CPoint&> worked as well. The trick is to use the member function GetData() to get a common array.
Thanks very much.
Thanks very much.
>>CArray<CPoint, CPoint&> worked as well
Both are in fact the same - CPoint is a very "thin" wrapper
Thank you!
Both are in fact the same - CPoint is a very "thin" wrapper
Thank you!
CArray<POINT, POINT> point_array;
// fill array
Polyline ( point_array.GetData(),poin
"GetData()" will return a POINT* or LPPOINT respectively.