I am not able to understand that why the constructor of A is called again after B. Or why not the same is happening after constructor of C is called.
So the compiler goes likes this...
First time it sees "new D" it
1. calls constructor of D
2. which in turn calls constructor of B (Since B if the first base class)
3. which in turn calls constructor of A (Prints "A")
4. then (Prints "B")
5. then the compiler calls constructor of C (Second base class)
6. which in turn again calls constructor of A (Prints "A")
7. then (Prints "C")
8. in the end (Prints "D")
So bottom line is unless base class constructor code executes derived class
constructor doesn't execute.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
This is due to the fact that the base class constructor has to get called before the derived class constructor gets call. since D derives from both B and C constructor of A gets called in either of the cases
Somethings seem HARD to do, until we know how to do them. _AnShUmAn_
No. Setting the Visible property to false means you want the window to be hidden, not shown. Now, are you wanting to show or hide the window? Perhaps the removal or inclusion of the WS_VISIBLE style is what you are after.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
Use SetWindowText() (documentation here) to set the text in the edit control.
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia