Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 10-07-2009
Member
 
Join Date: May 2008
Posts: 38
Need code to display message box in C++

Hi,

I want to know how to show the message box for C++?
I want it to appear on the screen like windows shows us the error messages. I know its possible with Vb. but I don't know how to do it in C++?

Need code to display message box in C++

Thanks in advance.
Reply With Quote
  #2  
Old 10-07-2009
Member
 
Join Date: May 2008
Posts: 1,144
Re: Need code to display message box in C++

Standard C++ has no window GUI support: you need to use some form of GUI library to do it.
I have a similar kind of query.
How to display a popup message in system tray icon?
I want a small popup message to show me that I have got message or email from a server. I want to know how to code it just like the yahoo tell you in system tray icon that you have got a new message.
Thanks.
Reply With Quote
  #3  
Old 10-07-2009
Member
 
Join Date: Oct 2008
Posts: 75
Re: Need code to display message box in C++

How to: Display Message Boxes

A MessageBox is a predefined dialog box that displays application-related information to the user. Message boxes are also used to request information from the user.
C++
Code:
public:
   void PerformCalculations()
   {
      // Code is entered here that performs a calculation
      // Display a message box informing the user that the calculations 
      // are complete
      MessageBox::Show("The calculations are complete",
         "My Application", MessageBoxButtons::OKCancel,
         MessageBoxIcon::Asterisk);
   }
Message boxes can also receive input. The Show method of the MessageBox class returns a value that can be used to determine a choice made by the user.
Code:
public:
   void ExitApplication()
   {
      // Display a message box asking users if they
      // want to exit the application.
      if (MessageBox::Show("Do you want to exit?",
         "My Application", MessageBoxButtons::YesNo,
         MessageBoxIcon::Question) == DialogResult::Yes)
      {
         Application::Exit();
      }
   }
http://msdn.microsoft.com/en-us/libr...ow(VS.71).aspx
Reply With Quote
  #4  
Old 10-07-2009
Member
 
Join Date: Apr 2008
Posts: 60
Re: Need code to display message box in C++

In Visual C++ you need to use APIs
MessageBox C++ Win32 API

I hope this video tutorial help you.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Need code to display message box in C++"
Thread Thread Starter Forum Replies Last Post
Unable to display Message Box in ASP.NET using VB.NET afidelino Software Development 4 06-11-2014 10:02 AM
Need help on removing Activation Required message BlackBerry 9930 Bold with MSL code SPC code Groupism Portable Devices 15 02-05-2014 03:00 PM
Nokia E7 is unable to display any new message Tees Mar KH Portable Devices 4 11-04-2011 06:26 AM
Annoying Message Display on Nokia E72 The!Winston Portable Devices 5 26-11-2010 07:43 AM
Display own Custom Message on Startup Orlando Customize Desktop 1 02-03-2009 06:16 PM


All times are GMT +5.5. The time now is 12:04 PM.