Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

easy MsgBox in Visual C++ 6.0 ??

Posted on 2002-05-10
5
Medium Priority
?
2,382 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 800 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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++.

721 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