mrDarker
2025-05-29 958cfa6b2e1c1eec0e20edc50816ef18f10cbf09
SourceCode/Bond/Servo/PortConfigurationDlg.cpp
@@ -30,7 +30,7 @@
        return;
    }
    const int nCols = 4;
    const int nCols = 3;
    const int nFixRows = 1;
    const int nRows = 9;
@@ -87,10 +87,10 @@
void CPortConfigurationDlg::FillGrid()
{
    CStringArray recipeOptions;
    recipeOptions.Add(_T("Recipe A"));
    recipeOptions.Add(_T("Recipe B"));
    recipeOptions.Add(_T("Recipe C"));
    //CStringArray recipeOptions;
    //recipeOptions.Add(_T("Recipe A"));
    //recipeOptions.Add(_T("Recipe B"));
    //recipeOptions.Add(_T("Recipe C"));
    for (int i = 1; i < 9; ++i) {
        CString strIndex;
@@ -99,19 +99,19 @@
        m_wndGrid.SetItemState(i, 0, GVIS_READONLY);
        // EQ Recipe - ComboBox
        if (m_wndGrid.SetCellType(i, 1, RUNTIME_CLASS(CGridCellCombo))) {
            CGridCellCombo* pCell = static_cast<CGridCellCombo*>(m_wndGrid.GetCell(i, 1));
            pCell->SetOptions(recipeOptions);
            pCell->SetStyle(CBS_DROPDOWNLIST);
        }
        m_wndGrid.SetItemText(i, 1, recipeOptions[0]);
        //if (m_wndGrid.SetCellType(i, 1, RUNTIME_CLASS(CGridCellCombo))) {
        //    CGridCellCombo* pCell = static_cast<CGridCellCombo*>(m_wndGrid.GetCell(i, 1));
        //    pCell->SetOptions(recipeOptions);
        //    pCell->SetStyle(CBS_DROPDOWNLIST);
        //}
        //m_wndGrid.SetItemText(i, 1, recipeOptions[0]);
        // Panel ID - 可编辑
        m_wndGrid.SetItemText(i, 2, _T(""));
        m_wndGrid.SetItemText(i, 1, _T(""));
        // Checkbox
        m_wndGrid.SetCellType(i, 3, RUNTIME_CLASS(CGridCellCheck));
        CGridCellCheck* pCheck = static_cast<CGridCellCheck*>(m_wndGrid.GetCell(i, 3));
        m_wndGrid.SetCellType(i, 2, RUNTIME_CLASS(CGridCellCheck));
        CGridCellCheck* pCheck = static_cast<CGridCellCheck*>(m_wndGrid.GetCell(i, 2));
        if (pCheck) {
            pCheck->SetCheck(FALSE);
        }