Solved

easy MsgBox in Visual C++ 6.0 ??

Posted on 2002-05-10
5
2,369 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

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!

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

738 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