We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.


Creates a .NET control matching the control's resource ID.

template <typename T>
void DDX_ManagedControl(
   CDataExchange* pDX, 
   int nIDC, 
   CWinFormsControl<T>& control 


A pointer to a CDataExchange Class object. The framework supplies this object to establish the context of the data exchange, including its direction.


The resource ID of the control associated with the control property.


A reference to a CWinFormsControl Class object.

DDX_ManagedControl calls CWinFormsControl::CreateManagedControl to create a control matching the resource control ID. Use DDX_ManagedControl to create controls from resource IDs in CDialog::OnInitDialog. For data exchange, you do not need to use the DDX/DDV functions with Windows Forms controls.

For more information, see How to: Do DDX/DDV Data Binding with Windows Forms.

Header: afxwinforms.h