CEdit* pCombo = (CEdit*)GetDlgItem(IDC_XXXX); // XXXX is the name of you comboboxex
pCombo->SetReadOnly();

The above code doesn't work, why not and what is the correct code?