Alexh
2009-09-23 21:44:44 UTC
Hi,
I have created my own SerializeElements() function but when I run the
code it still uses MFC's version.
I have the following line in my .h file -
class MyClass : Cobject
{
....
};
void AFXAPI SerializeElements(CArchive& ar,CChartInfo* pChartInfo, int
nCount);
and the following in my .cpp file (at the end)-
void AFXAPI SerializeElements(CArchive& ar, CChartInfo* pChartInfo,
int nCount)
{
for(int i=0;nCount;i++,pChartInfo++)
{
pChartInfo->Serialize(ar);
}
}
But the code MyCList.Serialize(ar) still ends up calling the
SerializeElements in afxtempl.h.
Whats the rule for overriding functions of this type? I do not have
#include <afxtempl.h> in my files but I know it's being compiled by
other code in my project.
Thanks
I have created my own SerializeElements() function but when I run the
code it still uses MFC's version.
I have the following line in my .h file -
class MyClass : Cobject
{
....
};
void AFXAPI SerializeElements(CArchive& ar,CChartInfo* pChartInfo, int
nCount);
and the following in my .cpp file (at the end)-
void AFXAPI SerializeElements(CArchive& ar, CChartInfo* pChartInfo,
int nCount)
{
for(int i=0;nCount;i++,pChartInfo++)
{
pChartInfo->Serialize(ar);
}
}
But the code MyCList.Serialize(ar) still ends up calling the
SerializeElements in afxtempl.h.
Whats the rule for overriding functions of this type? I do not have
#include <afxtempl.h> in my files but I know it's being compiled by
other code in my project.
Thanks