如何将ComboBox的选择项传递到List中去 在窗体中设置一个ComboBox,一个ListBox,一个Button,并在Member Variables中添加变量m_Combo1和m_List1。运行程序,在选择了ComboBox中的一个值时,按Button可将ComboBox选择的值传递到ListBox中去。不知道如何写这个OnButton 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以用combobox的getcursel来取得值吧 int nIndex;CString strText;nIndex=m_Combo1.GetCurSel();strText=m_Combo1.GetLBText(nIndex,strText);这样就可以了吧!! 写错了int nIndex; CString strText; nIndex=m_Combo1.GetCurSel(); m_Combo1.GetLBText(nIndex,strText); int nIndex; CString strText; nIndex=m_Combo1.GetCurSel(); m_Combo1.GetLBText(nIndex,strText);行了,再调用m_List1.AddString(strText);谢谢楼上的两位 有关GDI生成BMP图的问题,看看是否有资源泄露? CDialogBar CListView的Create方法问题??? 多文挡程序我又加了一个摸板,怎样得到其指针? 控制其他进程的scroll bar控件的问题 CListCtrl显示的图标总在第一个column的位置,如何才能让它显示到其他的column的位置上呢 有关树的操作 程序加断点执行成功, 但是不加断点就失败 奇怪的问题,分配空间为0,返回居然一个非空指针!!!大家来看看 内存怎么总是释放不了呢?? MFC中新建类时Class Type有三种形式。。。 向oracle数据表中写NUMBER类型的数据
CString strText;
nIndex=m_Combo1.GetCurSel();
strText=m_Combo1.GetLBText(nIndex,strText);
这样就可以了吧!!
int nIndex;
CString strText;
nIndex=m_Combo1.GetCurSel();
m_Combo1.GetLBText(nIndex,strText);
CString strText;
nIndex=m_Combo1.GetCurSel();
m_Combo1.GetLBText(nIndex,strText);行了,再调用m_List1.AddString(strText);谢谢楼上的两位