FIX: Error C2065: 'DDX_FieldCBIndex' : undeclared identifier (132396)
The information in this article applies to:
- The ClassWizard, when used with:
- Microsoft Visual C++, 32-bit Professional Edition 2.0
- Microsoft Visual C++, 32-bit Professional Edition 2.1
- Microsoft Visual C++, 32-bit Professional Edition 2.2
This article was previously published under Q132396 SYMPTOMS
When you use ClassWizard to map a drop list combobox to a foreign
CRecordset object's field through a record view integer member variable,
ClassWizard generates a call to DDX_FieldCBIndex in the record view's
DoDataExchange() member function:
void CMyRecordView::DoDataExchange(CDataExchange* pDX)
{
...
//{{AFX_DATA_MAP(CMyRecordView)
DDX_FieldCBIndex(pDX, IDC_COMBO1, m_pSet->m_id, m_pSet);
//}}AFX_DATA_MAP
}
When compiling the program, the compiler gives you the following compiler
error:
error C2065: 'DDX_FieldCBIndex' : undeclared identifier
CAUSE
The DDX_FieldCBIndex function is not implemented by the Microsoft
Foundation Classes.
RESOLUTION
Do not bind the integer data member of the record view to a drop down combo
box. Bind the data member to an edit control.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem was fixed in Microsoft
Visual C++, 32-bit Edition, version 4.0.
REFERENCES
For more information on binding record view fields to recordset objects,
please see the following MFC Encyclopedia articles:
ClassWizard: Mapping Form Controls to Recordset Fields
ClassWizard: Foreign Objects
Modification Type: | Major | Last Reviewed: | 12/9/2003 |
---|
Keywords: | kbBug kbDatabase kbfix kbNoUpdate kbVC400fix kbwizard KB132396 |
---|
|