1 //定义变量,并关联控件与变量。IDC_RecvData为控件ID,recvData为控件对应的变量名 2 CListBox recvData; 3 4 DDX_Control(pDX, IDC_RecvData, recvData); 5 6 //向List Box控件IDC_RecvData中添加一行数据 7 CString str; 8 recvData.AddString(str);
1 //定义变量,并关联控件与变量。IDC_RecvData为控件ID,recvData为控件对应的变量名 2 CListBox recvData; 3 4 DDX_Control(pDX, IDC_RecvData, recvData); 5 6 //向List Box控件IDC_RecvData中添加一行数据 7 CString str; 8 recvData.AddString(str);