easy MsgBox in Visual C++ 6.0 ??

I know there is a function Msgbox in Visual Basic to pop up a simple msg box for error or warning. But what is the easy way to do that in C++ 6.0 with MFC? Do I have to create a dialog in resourse? Sorry, I'm new.
LVL 1
quanghocAsked:
Who is Participating?
 
jkrConnect With a Mentor Commented:
Just use "AfxMessageBox()" - e.g. like

AfxMessageBox ( "This is a Test");

or "MessageBox()" in general.

MessageBox ( NULL, "This is a test", "Test Caption", MB_ICONINFORMATION | MB_OK);
0
 
jkrCommented:
BTW, regarding the question about the resource - no, you don't have to, Windows will take care of that in case of a message box.
0
 
quanghocAuthor Commented:
Good, Thanks.
0
 
jkrCommented:
You are welcome - feel free to post here if you encounter any problems.
0
 
quanghocAuthor Commented:
Good, Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.