I have the following piece of code:
But...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() ;
CLocation:: DoPropertiesDlg()
is ALWAYS called, not..
CShapeLocation:: DoPropertiesDlg()
as I would have expected. What am I doing wrong?
Thanks
Rob.




Reply With Quote