rliq
January 17th, 2003, 08:14 PM
I have the following piece of code:
CLocation* CLocation::CreateNewLocation( ... ) // Static Function
{
// May return pointers to different classes derived from
// CLocation, but for this example:
return new CShapeLocation();
}
...
// Main Code
CLocation* pLocation = CLocation::CreateNewLocation( ... );
pLocation->DoPropertiesDlg() ;
But...
CLocation:: DoPropertiesDlg()
is ALWAYS called, not..
CShapeLocation:: DoPropertiesDlg()
as I would have expected. What am I doing wrong?
Thanks
Rob.
CLocation* CLocation::CreateNewLocation( ... ) // Static Function
{
// May return pointers to different classes derived from
// CLocation, but for this example:
return new CShapeLocation();
}
...
// Main Code
CLocation* pLocation = CLocation::CreateNewLocation( ... );
pLocation->DoPropertiesDlg() ;
But...
CLocation:: DoPropertiesDlg()
is ALWAYS called, not..
CShapeLocation:: DoPropertiesDlg()
as I would have expected. What am I doing wrong?
Thanks
Rob.