Click to See Complete Forum and Search --> : Very simple question


April 15th, 1999, 08:56 AM
I'm just making my first attempts with Visual C++ (6.0).
I'm using MFC AppWizard to make a dialog box with a button and an edit field.
I want that when user press the button a string "Hello" appears in the edit field.
That's it.
Maybe I have to use SetWindowText but I don't know how to refer to the edit field.
Can you help me please?
Thank you!

Franky Braem
April 15th, 1999, 09:03 AM
With the classwizard (View menu) you can link a membervariable to your EditBox. Fill that variable
in the OnClick of the button and call the UpdateData-method(with parameter FALSE) from the dialog. That should do it.

April 15th, 1999, 10:25 AM
Thank you very much, it works!!!
Ciao.