AddString
int AddString( LPCSTR lpcsz )
EX1
#include <..\OriginLab\DialogEx.h> #define IDC_COMBO1 1001 void ComboBox_AddString_ex1(Dialog& MyDlg) { ComboBox m_cmbBox; m_cmbBox = MyDlg.GetItem(IDC_COMBO1); int nCount = m_cmbBox.GetCount(); int nRet = m_cmbBox.AddString("Red"); ASSERT(nCount+1 == m_cmbBox.GetCount()); }
Control.h