如何往文本框里写字,写的是按钮控件的CAPTION
m_duo为文本框的变量名,m_b01为按钮的变量名
m_duo=m_b01.CAPTION;
会出错:error C2039: 'CAPTION' : is not a member of 'CButton'、怎么办呢?

解决方案 »

  1.   

    是需要定义 CAPTION 吗?
    在哪里定义?
      

  2.   

    m_duo=m_b01.GetWindowText();
    this->UpdateData(FALSE);
      

  3.   

    对呀,我一直都是用VB的,突然让我写VC,一窍不通啊。5555
      

  4.   

    m_duo=m_b01.GetWindowText();
    this->UpdateData(FALSE);会出错:
    error C2661: 'GetWindowTextA' : no overloaded function takes 0 parameters
      

  5.   

    1.
    m_duo为CString类型的
    m_b01.GetWindowText(m_duo);
    this->UpdateData(FALSE);2.
    m_duo为CEdit类型的
    CString strText;
    m_b01.GetWindowText(strText);
    m_duo.SetWindowText(strText);