|
From: Graeme F. <gr...@dr...> - 2002-04-20 12:46:45
|
The CDialog1::CDialog1(CWnd* pParent /*=NULL*/) is the constructor for the CDialog1 class. Now because this class will inherit from the CDialog class it must be able to call the default constructor for the CDialog class. However this class probably doesn't have a default constructor, in which case the constructor has to be called explicitly, hence the line : CDialog(CDialog1::IDD, pParent) which calls the CDialog constructor passing it IDD a static variable from CDialog and pParent argument passed in. Now that the CDialog constructor has been called the rest of the CDialog1 constructor can be executed. >>What does it mean when you have the scope resolution operator and the single >>: in the same bit of code? >> >>e.g. >> >>CDialog1::CDialog1(CWnd* pParent /*=NULL*/) >> : CDialog(CDialog1::IDD, pParent) >> >>? |