✎
编程开发网
首页
C语言
C++
面试
Linux
函数
Windows
数据库
下载
搜索
当前位置:
首页
->
AI编程基础
->
c++编程基础
C++MFC编程笔记day09 MF界面控件的使用1(三)
2015-07-20 17:55:33
·
作者:
·
浏览:
36
标签:
MFC
编程
笔记
day09
界面
控件
使用
r to display while the user drags // the minimized window. HCURSOR CDlgCtrl2Dlg::OnQueryDragIcon() { return (HCURSOR) m_hIcon; } void CDlgCtrl2Dlg::OnButtonEqual() { // TODO: Add your control notification handler code here UpdateData(TRUE); m_edit_sum=m_edit_a+m_edit_b; UpdateData(FALSE); } void CDlgCtrl2Dlg::OnBUTTONToLeft() { // TODO: Add your control notification handler code here int sel=m_list_right.GetCurSel(); if(sel==LB_ERR) return; CString str; m_list_right.GetText(sel,str);//获取右边值 m_list_left.AddString(str);//添加到左边 m_list_right.DeleteString(sel);//删除右边 } void CDlgCtrl2Dlg::OnBUTTONToLeftALL() { // TODO: Add your control notification handler code here CString str; while(m_list_right.GetCount()>0) { m_list_right.GetText(0,str); m_list_left.AddString(str); m_list_right.DeleteString(0); } } void CDlgCtrl2Dlg::OnBUTTONToRight() { // TODO: Add your control notification handler code here //获取左边列表选择项 int sel=m_list_left.GetCurSel(); if(sel==LB_ERR) return; CString str; m_list_left.GetText(sel,str);//获取左边值 m_list_right.AddString(str);//添加到右边 m_list_left.DeleteString(sel);//删除左边 } void CDlgCtrl2Dlg::OnBUTTONToRightALL() { // TODO: Add your control notification handler code here CString str; while(m_list_left.GetCount()>0) { m_list_left.GetText(0,str); m_list_right.AddString(str); m_list_left.DeleteString(0); } }
【示例代码稍后补充】
首页
上一页
1
2
3
4
5
下一页
尾页
3
/5/5