다음을 통해 공유


DDX_FieldCBStringExact

The DDX_FieldCBStringExact function manages the transfer of CString data between the edit control of a combo box control in a record view and a CString field data member of a recordset associated with the record view.

void AFXAPI DDX_FieldCBStringExact( 
   CDataExchange* pDX, 
   int nIDC, 
   CString& value, 
   CRecordset* pRecordset  
); 
void AFXAPI DDX_FieldCBStringExact( 
   CDataExchange* pDX, 
   int nIDC, 
   CString& value, 
   CDaoRecordset* pRecordset  
);

매개 변수

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

  • nIDC
    The ID of a control in the CRecordView or CDaoRecordView object.

  • value
    A reference to a field data member in the associated CRecordset or CDaoRecordset object.

  • pRecordset
    A pointer to the CRecordset or CDaoRecordset object with which data is exchanged.

설명

When moving data from the recordset to the control, this function sets the current selection in the combo box to the first row that exactly matches the string specified in value. On a transfer from the recordset to the control, if the recordset field is NULL, any selection is removed from the combo box and the edit box of the combo box is set to empty. On a transfer from control to recordset, if the control is empty, the recordset field is set to NULL.

Use the first version if you are working with the ODBC-based classes. Use the second version if you are working with the DAO-based classes.

DDX에 대한 자세한 내용은 대화 상자 데이터 교환 및 유효성 검사를 참조하십시오. For examples and more information about DDX for CRecordView and CDaoRecordView fields, see the article Record Views.

예제

See DDX_FieldText for a general DDX_Field example. Calls to DDX_FieldCBStringExact would be similar.

요구 사항

Header: afxdao.h

참고 항목

참조

DDX_FieldText

DDX_FieldRadio

DDX_FieldLBString

DDX_FieldLBStringExact

DDX_FieldCBString

개념

MFC 매크로 및 전역