I have the following piece of code:
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.