HWND PrepareEditCtrl( int nIDC );
throw( CNotSupportedException );
Return Value
The HWND of the edit control being prepared for DDX or DDV.
Parameters
nIDC
The ID of the edit control to be prepared for DDX or DDV.
Remarks
The framework calls this member function to prepare the specified edit control for dialog data exchange (DDX) and validation (DDV). Use PrepareCtrl instead for all non-edit controls.
Preparation consists of two things. First, PrepareEditCtrl stores the control’s HWND in the CDataExchange class. The framework uses this handle to restore the focus to the previously focused control in the event of a DDX or DDV failure. Second, PrepareEditCtrl sets a flag in the CDataExchange class to indicate that the control whose data is being exchanged or validated is an edit control.
Implementors of custom DDX or DDV routines should call PrepareEditCtrl for all edit controls for which they are exchanging data via DDX or validating data via DDV.
For more information on writing your own DDX and DDV routines, see Technical Note 26. For an overview of DDX and DDV, see Dialog Data Exchange and Validation and Dialog Box Topics in Visual C++ Programmer's Guide.
CDataExchange Overview | Class Members | Hierarchy Chart
See Also CDataExchange::Fail