The ATL control hosting code provides two main ways of creating controls. For details on each of these techniques, see How Do I Load Controls Specified at Runtime? and How Do I Load Controls Specified On a Dialog Resource?.
ATL Control Containment FAQ