How change edit control's text?

前端 未结 3 1848
无人共我
无人共我 2021-01-23 22:31

I have a button and text control in MFC dialog window, when I click on button, in edit control must be replaced for example \"hello world\".
but if I write

3条回答
  •  滥情空心
    2021-01-23 23:10

    First you need a CEdit member variable of the dialog. Use 'Add Variable' in the dialog editor. If you name this variable m_helloedit then in your button click function

    m_helloedit.SetWindowText(_T("hello world!"));
    

提交回复
热议问题