ComboBox::AddString

Description

Syntax

int AddString( LPCSTR lpcsz )

Parameters

lpcsz

Return

Examples

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());
}

Remark

See Also

header to Include

Control.h