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
edit="hello wordl"
it doesn't change, how can I change?
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
edit="hello wordl"
it doesn't change, how can I change?
Use the
SetWindowText
method: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 functionFirst you should add a variable to edit.To do that right click on the edit and choose Add Variable... in
Add Member variable Wizard
change Category fromControl
toValue
after that in the Variable name field type a name likem_EditValue
then click finish.from now you can change the Edit Control simply by following code.