1. Dialog
For example, in the login dialog, there are two sub-dialogs, one is to log in by user name, and the other is to log in by meeting room number.
Construction: first call the child dialog constructor, and then call the parent dialog constructor;
Destruction: First call the parent dialog destructor, and then adjust the child dialog destructor.
2. Window
For example: there are 2 windows, A and B, B is a child window of A, that is, A->GetSafeWnd() == ((A*)(B->GetParent()))->GetSafeWnd()
Construction: first call the parent window constructor, and then adjust the child window constructor;
Destruction: First adjust the destructor of the child window, and then adjust the destructor of the parent window.