Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2387
  • Last Modified:

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.
0
quanghoc
Asked:
quanghoc
  • 3
  • 2
1 Solution
 
jkrCommented:
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now