HRESULT InitFields(IFieldCallback *pFieldCallback = nullptr)

Before calling this method, call AddField for each field that the XML can control. This method always returns S_OK.

The pFieldCallback parameter is optional. If you provide it, the form controller calls SetFieldDefault for controls that are not either CONTROL_STATIC_TEXT or CONTROL_CHECK_BOX. This behavior allows you to retrieve a default value from the XML and set it in the control yourself.

Related Topics

IFormController Interface