Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize


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

Community Additions

© 2015 Microsoft