Solved

easy MsgBox in Visual C++ 6.0 ??

Posted on 2002-05-10
5
2,364 Views
Last Modified: 2009-03-31
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
Comment
Question by:quanghoc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 7002706
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
 
LVL 86

Expert Comment

by:jkr
ID: 7002708
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
 
LVL 1

Author Comment

by:quanghoc
ID: 7002741
Good, Thanks.
0
 
LVL 86

Expert Comment

by:jkr
ID: 7002743
You are welcome - feel free to post here if you encounter any problems.
0
 
LVL 1

Author Comment

by:quanghoc
ID: 7002751
Good, Thanks.
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question