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
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.


The DDX_Control function subclasses the control, specified by nIDC, of the dialog box, form view, or control view object.

void AFXAPI DDX_Control( 
   CDataExchange* pDX, 
   int nIDC, 
   CWnd& rControl  


A pointer to a CDataExchange object.


The resource ID of the control to be subclassed.


A reference to a member variable of the dialog box, form view, or control view object related to the specified control.

The pDX object is supplied by the framework when the DoDataExchange function is called. Therefore, DDX_Control should only be called within your override of DoDataExchange.

For more information about DDX, see Dialog Data Exchange and Validation.

Header: afxdd_.h

Community Additions

© 2015 Microsoft