Hi
I have declared a CObArray in the document of a SDI program. this array contains object which have another cobarray for themselves. Parent of both of these objecs is CButton class. When I want to Serialize the objects I call the first CObArray Serialize in the Serialize of the Document class and the Serialize of the second array in the first object's Serialize. For the first one it works but when it comes to loading the second CobArray during the run time the program halts with the following error : Unhandled exception at 0x7c208a9b (mfc70d.dll) in Design.exe: User breakpoint.
Does anyone has any ideas?
p.s following is the code which I wrote for both Serialize functions:
{
char str[20];
CRect r;
if(ar.IsStoring()){
GetWindowRect(&r); CurrentView->ScreenToClient(&r);
// ar << r;
GetWindowText(str,sizeof(str)-1);
ar << str;
}
else{
ar >> r;
ar >> str;
SetWindowText(str);
SetWindowPos(NULL,r.left,r.top,r.right-r.left,r.bottom-r.top,SWP_NOZORDER);
}
}