Hi If have a class member say CFont cf; which is a member of My CDialig derived class which I create on the heap via new Does storage for cf get allocated when I do the new for the CDialog derived class Thanks
Hi If have a class member say CFont cf; which is a member of My CDialig derived class which I create on the heap via new Does storage for cf get allocated when I do the new for the CDialog derived class Thanks
Yes, storage for class members will be allocated when the object is created. In the case of class objects (such as your CFont object) their constructor will be called to create them. You can see this happen by stepping through the code in the debugger.