This is the third time you've asked the question and the second new thread you've started. If somebody has an answer they will give it, posting the question repeatedly makes most people not want to help.
Have you read the link I gave you? I thought it had some good information on the subject.
sorry uolj i didn't want to be repetitive... i get help from your link but my app still doesn't work like due...i assume i could send you my project via email so that u could look it...if u want of course...
Sorry, like I said I don't do much work in this area, and I don't really have time to figure it out for you.
If you've tried something, post it. You really haven't posted much code, so it is hard for people to help you. The more you post, the easier it is. It sounds like you should be able to make a small, one file, test program that has the same problem. Try doing that and posting all the code here. Include what you have tried and think should work. That will make it easier for those of us who don't know the answer off the top of our heads to potentially help you figure it out.
class SpLine is for handling graphic SpLine so it has ControlPoints(the node of curve) and real CurvePoints represented by 2 CArray objects of types POINT.
In my CView derived class handles MouseMove message:
void MyView::OnMouseMove(UINT nFlags, CPoint point)
{
pDoc->m_ControlPoints[m_MoveIndex] = point;
if (pDoc->m_ControlPoints.GetSize()>1)
{
Spline spline(pDoc->m_ControlPoints.GetData(),pDoc->m_ControlPoints.GetSize());
spline.Generate();
CSpLine* pSpLine = new CSpLine(m_ControlPoints,m_CurvePoints);
m_oaSpLines.Add(pSpLine);
return pSpLine;
}
where m_oaSpLines is a CObArray.
i call serialize in document class for m_oaSpLine
void mydocument::Serialize(CArchive& ar)
{
m_oaSpLines.Serialize(ar);
}
so we recall serialize in SpLine class and i don't know how to implement serialization here,i can't use << >> operators so if i write
void CSpLine::Serialize(CArchive &ar)
{
m_ControlPoints.Serialize(ar);
m_CurvePoints.Serialize(ar);
/* i can't write
if (ar.IsStoring)
ar << m_ControlPoints <<m_CurvePoints;
else
ar >> m_ControlPoints >>m_CurvePoints;
*/
}
there's no compiler error but there's no serialization and i lost data...
i hope it's quite clear...
Good, that should help someone. Unfortunately it doesn't help me much. What about your attempt to use SerializeElements? I thought that's what you need to use.
Also, in the future you should post code inside the [code][/code] tags so that it is easier to read.
i tried to use SerializeElements but i think it not resolve the problem, 'cos if i don't say wrong it makes a cycle for CArray "MyClass" Objects in CDocument class, calling once per objects the serialize function within MyClass Class.
But my problem is that i go on serialize method of MyClass from starting CObArray and so in MyClass i have CArray objects to Serialize...and i really don't know how to do...therefore the CArray variables care array of POINT structures, so not user-defined types, and so this structure hasn't a serialize method...i think i must change road...i'm doing a mistake...i'm sure but i don't know how solve...please some guru help me
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.