Results 1 to 4 of 4

Thread: Need code to display message box in C++

  1. #1
    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.

  2. #2
    Join Date
    May 2008
    Posts
    1,149

    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.

  3. #3
    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

  4. #4
    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.

Similar Threads

  1. Unable to display Message Box in ASP.NET using VB.NET
    By afidelino in forum Software Development
    Replies: 4
    Last Post: 06-11-2014, 10:02 AM
  2. Replies: 15
    Last Post: 02-05-2014, 03:00 PM
  3. Nokia E7 is unable to display any new message
    By Tees Mar KH in forum Portable Devices
    Replies: 4
    Last Post: 11-04-2011, 06:26 AM
  4. Annoying Message Display on Nokia E72
    By The!Winston in forum Portable Devices
    Replies: 5
    Last Post: 26-11-2010, 07:43 AM
  5. Display own Custom Message on Startup
    By Orlando in forum Customize Desktop
    Replies: 1
    Last Post: 02-03-2009, 06:16 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,625,580.47737 seconds with 17 queries