-
I'm new to VC++. So please help me out... tnx :)
When I begin an MFC-project, dialog-based, I can put functions and code to events. I have played with the messagebox and other things, but what I want to know now, is what do I have to do, to get "Hello world" into a textfield(text1.text = "hello world") or set the caption of a button to it(command1.caption = "hello world") for example.
Other question, how can I disable and enable a button (commandbutton in VB, 'command1.enabled = false').
Thanks.
morph
-
In the class wizard assign a variable with the button.
Ex. m_button
Code:
m_button.Enabled(TRUE);
-
tnx..
Made the variable... tried the code, but when compiling it gives me this error:
Code:
'Enabled' : is not a member of 'CButton'
And in the dropdown list of arguments, enabled isn't there....
:(
tnx :)
-
Sorry:
Code:
m_button.EnableWindow (TRUE);
//and
m_button.SetWindowText ("text");
-
tnx :)
That cleared some things up!