0

I have an MFC project where I have a child window that is a CDialog class extension and inside that I draw a number of widgets that are each an extension of CStatic class. Now I want to add a surface to the main window where I draw all of the same widgets but presents itself to the main window as a single object I can move around and show or hide at will. How can I do this? Can a CStatic be parent to other CStatic objects?

Ren P
  • 929
  • 9
  • 20

1 Answers1

0

Yes as it turns out, a CStatic can be used as parent to other CStatic objects. Caveats are that creation of the children is best deferred until the Create function has been called. What I was doing in OnInitDialog before is now done in the Create function, after calling the Create function of the base class.