Results 1 to 5 of 5

Thread: display message

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    635

    display message

    What is the most simple method to display a message box in a c++ builder 4 program and quit a c++ builder program?
    Last edited by aafuss; Feb 21st, 2003 at 06:05 AM.
    A.A. Fussy
    Babya Software Group

  2. #2
    Hyperactive Member
    Join Date
    Sep 2001
    Posts
    396
    I have to inform you that most of us here use VC for windows programming.

    I heard that Borland website has a forum for BCB users and developers, you may have better luck there.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    But message boxes are independent of the compiler. The MessageBox windows API function shows a message box.

    For abnormal program termination, try TerminateProcess() or abort().
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    You can use the Windows API:

    MessageBox
    Code:
    MessageBox(hwnd, "My Message", "Message Title", MB_OK);
    and to quit a console-app it's usually simply returning from the main function (or exit(returnvalue) if you want to app to close immediatly)

    For Windowsapps you can use PostQuitMessage or SendMessage with WM_CLOSE
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    635
    I think it's close() in bcb+++4 (looked in its help file).
    A.A. Fussy
    Babya Software Group

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width