MFC: OnInitialUpdate function of the CFormView class

My CFormView class is structured as follows:

class FormViewClass : public CFormView
{
        ...
        FormViewClass();
        void Initialize();
        virtual void OnInitialUpdate();
        ...
};

Ideally, I would like to call the Initialize () function in the constructor body as follows:

FormViewClass::FormViewClass()
{
        ...
        // originally I want to call Initialize function here
        Initialize();
        ...
}

However, since I want this function to be responsible for all the initialization of this class at creation, and it contains the initialization of MFC objects such as combobox, edit control, checkbox control, switch control, etc., should I be calling instead here's the Initialize () function, as I thought:

void FormViewClass::OnInitialUpdate()
{
    // Should I call Initialize function instead here?
    Initialize();
}

-MFC- ( - Iniitalize() ) MFC OnIniitalUpdate(). , . .

+3
1

, , , .

, ( 8-), GUI, GUI OnInitialUpdate .

( OnInitDialog CFormView, , , , OnInitialUpdate, , .)

+6

Source: https://habr.com/ru/post/1711035/


All Articles