search

Home  >  Q&A  >  body text

mvc - In which function are the creation and initialization of controls in MFC written? OnCreate or OnInitialUpdate?

The application scenario is a single document program, base class CFormView;
I now create and initialize a TAB control in the OnInitialUpdate function, but there is no way to do the MoveWindow operation in OnSize. The analysis is that OnInitialUpdate has not been executed when OnSize is called.
I don’t know if you usually initialize the controls on the interface in OnInitialUpdate or OnCreate or some other function.

ringa_leeringa_lee2751 days ago573

reply all(1)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 17:08:45

    Generally in OnCreate

    reply
    0
  • Cancelreply