如题,小弟是菜鸟,请高手指点

解决方案 »

  1.   

    CComboBox::GetLBText
    int GetLBText( int nIndex, LPTSTR lpszText ) const;void GetLBText( int nIndex, CString& rString ) const;
      

  2.   

    给你的列表框关联一个变量
    CComboBox m_ComboBox;
    CString strText;
    m_ComboBox.GetLBText(0,strText);//得到下拉框的第一项的字符串
      

  3.   


    void CDemoDlg::OnCbnSelchangeCombo1()
    {
    // TODO: 在此添加控件通知处理程序代码
    CString strText;
    int nIndex =m_ComboBox.GetCurSel();
    m_ComboBox.GetLBText(nIndex,strText);

           //或者
            /*
            CString strText;
    m_ComboBox.GetWindowText(strText.GetBuffer(100),100);
    strText.ReleaseBuffer();
    */
    }