banner despecable me2

วันศุกร์ที่ 12 กรกฎาคม พ.ศ. 2556

lab13 การเพิ่ม Combobox ใน Dialog based Application




void Clab13Dlg::OnBnClickedButtonAdd()
{
CString srcText;
m_editSource.GetWindowText (srcText);
m_comboBox1.AddString(srcText);
// TODO: Add your control notification handler code here
}


void Clab13Dlg::OnCbnSelchangeCombo1()
{
CString str;
int idx = m_comboBox1.GetCurSel();
if( idx < 0 )
return;
m_comboBox1.GetLBText( idx, str);
m_staticDestination.SetWindowTextW(str );// TODO: Add your control notification handler code here
}

ไม่มีความคิดเห็น:

แสดงความคิดเห็น