主题:VC++ CComboBox问题
BOOL CM114g_4Axis_SampleDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
//===== Set Default Value=====
CComboBox *cmbPtr; (这里的*cmbPtr是什么意思?)
for(int i = 0; i < 4; i++) {
//Set Move Mode
cmbPtr = (CComboBox *)GetDlgItem(IDC_cmbMoveMode + i);
(这里的IDC_cmbMoveMode + i,指的是进过四个循环,IDC_cmbMoveMode0,IDC_cmbMoveMode1,IDC_cmbMoveMode2,IDC_cmbMoveMode3吗?为什么呢?)
cmbPtr->SetCurSel(0);
//Set Velocity Profile
SetDlgItemInt(IDC_edtDist + i, 12000 + 2000*i);
SetDlgItemInt(IDC_edtStrVel + i, 500 + 100*i);
SetDlgItemInt(IDC_edtMaxVel + i, 5000 + 1000*i);
SetDlgItemText(IDC_edtTacc + i, "0.3");
SetDlgItemText(IDC_edtTdec + i, "0.5");
}
谢谢各位达人回复。
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
//===== Set Default Value=====
CComboBox *cmbPtr; (这里的*cmbPtr是什么意思?)
for(int i = 0; i < 4; i++) {
//Set Move Mode
cmbPtr = (CComboBox *)GetDlgItem(IDC_cmbMoveMode + i);
(这里的IDC_cmbMoveMode + i,指的是进过四个循环,IDC_cmbMoveMode0,IDC_cmbMoveMode1,IDC_cmbMoveMode2,IDC_cmbMoveMode3吗?为什么呢?)
cmbPtr->SetCurSel(0);
//Set Velocity Profile
SetDlgItemInt(IDC_edtDist + i, 12000 + 2000*i);
SetDlgItemInt(IDC_edtStrVel + i, 500 + 100*i);
SetDlgItemInt(IDC_edtMaxVel + i, 5000 + 1000*i);
SetDlgItemText(IDC_edtTacc + i, "0.3");
SetDlgItemText(IDC_edtTdec + i, "0.5");
}
谢谢各位达人回复。