我使用了可编辑的下拉框,但是不知道怎么读取编辑后的文字

解决方案 »

  1.   

    给这个下拉框加个CString的变量就行了呀。
    是在dialog里用的吧?在class iew里就可以加个变量的
      

  2.   

    CComboBox  m_box;//一个下拉框的变量
    CString text;
    m_box.GetWindowText(text);//这个字符串就是你下拉框中的文字。
      

  3.   

    CComboBox  m_box;
    CString text;UpdateData(TRUE);
    m_box.GetWindowText(text);
      

  4.   

    写错了应该是
    CComboBox  m_box;
    CString text;UpdateData(TRUE);
    然后把与控件关联的text随便传给别的变量就可以用了
      

  5.   

    CComboBox::GetLBText
    int GetLBText( int nIndex, LPTSTR lpszText ) const;void GetLBText( int nIndex, CString& rString ) const;Return ValueThe length (in bytes) of the string, excluding the terminating null character. If nIndex does not specify a valid index, the return value is CB_ERR.ParametersnIndexContains the zero-based index of the list-box string to be copied.lpszTextPoints to a buffer that is to receive the string. The buffer must have sufficient space for the string and a terminating null character.rStringA reference to a CString.
      

  6.   

    nIndex//ComboBox的索引,0开始
    rString//是一个CString对象的引用,用来存储返回值。