1.加入LIST BOX控件
2.声明位于
/ Dialog Data
//{{AFX_DATA(CVoltagecontrolDlg)
enum { IDD = IDD_VOLTAGECONTROL_DIALOG };
CListBox m_tlist;
...
//}}AFX_DATA
3.初始化
void CVoltagecontrolDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CVoltagecontrolDlg)
DDX_Control(pDX, IDC_LIST1, m_tlist);
...
//}}AFX_DATA_MAP
}
4.程序
CString buffer; //data list
buffer.Format(_T("T = %6.3f"),m_voltageout);
m_tlist.AddString(buffer);