What is the most simple method to display a message box in a c++ builder 4 program and quit a c++ builder program?
Printable View
What is the most simple method to display a message box in a c++ builder 4 program and quit a c++ builder program?
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.
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().
You can use the Windows API:
MessageBox
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)Code:MessageBox(hwnd, "My Message", "Message Title", MB_OK);
For Windowsapps you can use PostQuitMessage or SendMessage with WM_CLOSE
I think it's close() in bcb+++4 (looked in its help file).