响应OnSelectChange()消息,用GetDlgItemText()或GetDlgItemInt()
取值

解决方案 »

  1.   

    GetDlgItemText()
    怎么用,请给个例子好么?
      

  2.   

    相应OnLbuttonDown消息,用HitTest()取得ListItem,再使用GetItemText就得到了
      

  3.   

    同意楼上,给你的ListBox映射一个变量m_ListBox;
    然后添加消息函数;
    CString str;
    int index=m_ListBox.GetCurSel();
    m_ListBox.GetText(index,str);//str就存入了你选中的数据,如果有多个选中,用个循环即可!!
    然后AfxMessageBox(str);
      

  4.   

    //这是我的用法:
    //假如再你的对话框中有一ListBox对象m_ListBox, 
    TCHAR text[MAX_PATH];
    m_ListBox.GetText(m_ListBox.GetCaretIndex(), text);
    AfxMessageBox(text);