1
votes

I'm totally new to c++, MFC. Currently trying out on doing a GUI with a button and to display a "hello world" text when the button is pressed. How i can do it?

THANKS

1
If you're okay with the text being displayed in a new window, it's really easy: just use the MessageBox function. MFC might have a special way to do this, but the raw Windows API function for that is pretty easy, too.icktoofay

1 Answers

0
votes

Here's a tutorial on MFC:

Basically, you need to:

1) Create a button and an edit field or label (resource editor)

2) Define an "OnClick" event handler (class editor)

3) "SetWindowText()" on the label in your event handler

This link shows examples for steps 2 and 3: