怎么样写下面函数的代码:void CDisplayDlg::OnChangeSongname() 
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.

// TODO: Add your control notification handler code here

}谢谢!

解决方案 »

  1.   

    UpdateData(TRUE)or直接GetWindowsText
      

  2.   

    在classwizard中为你的control命名为m_EditSongName;
    void CDisplayDlg::OnChangeSongname() 
    {
    // TODO: If this is a RICHEDIT control, the control will not
    // send this notification unless you override the CDialog::OnInitDialog()
    // function and call CRichEditCtrl().SetEventMask()
    // with the ENM_CHANGE flag ORed into the mask.
    char buf[200];
             m_EditSongName.GetwindowText(200,buf);//buf中就是变化后的字符串
    // TODO: Add your control notification handler code here

    }
      

  3.   

    UpdateData(true)控件到变量
    UpdateData(false)变量到控件