|
-
Apr 24th, 2001, 04:31 AM
#1
Thread Starter
Addicted Member
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
-
Apr 24th, 2001, 12:29 PM
#2
Frenzied Member
In the class wizard assign a variable with the button.
Ex. m_button
Code:
m_button.Enabled(TRUE);
-
Apr 24th, 2001, 12:53 PM
#3
Thread Starter
Addicted Member
-
Apr 24th, 2001, 03:21 PM
#4
Frenzied Member
Sorry:
Code:
m_button.EnableWindow (TRUE);
//and
m_button.SetWindowText ("text");
-
Apr 24th, 2001, 03:33 PM
#5
Thread Starter
Addicted Member
tnx 
That cleared some things up!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|