在编程中,DDX_Text()和DDX_Control()这两个函数在数据绑定和控件操作中扮演着不同的角色。DDX_Text()的主要功能是将字符串变量与控件的文本属性关联起来。例如,在函数CView::DoDataExchange()中,它将变量m_strID的值与控件IDC_ID_VALUE的WindowText属性关联,以便在数据交换过程中同步更新。DDX_C...
DDX_TEXT()的作用可以理解为把字符串变量和控件的文本(WindowText)关联起来, DDX_Control()的作用可以理解为把变量和控件本身关联起来, DoDataExchange(pDX)就是处理所有变量与其关联控件交换数据的函数。 void CView::DoDataExchange(CDataExchange* pDX) { CFormView::DoDataExchange(pDX); DDX_Text(pDX, IDC_I...
DDX_TEXT()的作用可以理解为把字符串变量和控件的文本(WindowText)关联起来, DDX_Control()的作用可以理解为把变量和控件本身关联起来, DoDataExchange(pDX)就是处理所有变量与其关联控件交换数据的函数。 void CView::DoDataExchange(CDataExchange* pDX) { CFormView::DoDataExchange(pDX); DDX_Text(pDX, IDC_...
DDX_TEXT()的作用可以理解为把字符串变量和控件的文本(WindowText)关联起来, DDX_Control()的作用可以理解为把变量和控件本身关联起来, DoDataExchange(pDX)就是处理所有变量与其关联控件交换数据的函数。 void CView::DoDataExchange(CDataExchange* pDX) { CFormView::DoDataExchange(pDX); DDX_Text(pDX, IDC_I...
DDX_TEXT()的作用可以理解为把字符串变量和控件的文本(WindowText)关联起来, DDX_Control()的作用可以理解为把变量和控件本身关联起来, DoDataExchange(pDX)就是处理所有变量与其关联控件交换数据的函数。 void CView::DoDataExchange(CDataExchange* pDX) ...
DDX_Control(pDX, IDC_STATIC_EQ22, m_StaticEq22); DDX_Control(pDX, IDC_STATIC_EQ23, m_StaticEq23); DDX_Control(pDX, IDC_STATIC_EQ33, m_StaticEq33);DDX_Text(pDX, IDC_STATIC_EQ11, m_static_eq11);DDX_Text(pDX, IDC_STATIC_EQ12, m_static_eq12);DDX_Text(pDX, IDC_STATIC_EQ13...
你关联的是一个控件类型,但你代码里却是一个变量类型。所以报错了。如果你就是想关联一个CString的变量类型,将DDX_Control改成DDX_Text
void AFXAPI DDX_Control( CDataExchange* pDX, int nIDC, CWnd& rControl ); Parameters pDX A pointer to aCDataExchangeobject. nIDC The resource ID of the control to be subclassed. rControl A reference to a member variable of the dialog box, form view, or control view object related to the...
TheDDX_Textfunction manages the transfer of int,UINT,long,DWORD,CString,float, ordoubledata between an edit control in a dialog box, form view, or control view and aCStringdata member of the dialog box, form view, or control view object. ...