home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 2.ddi / TVINC.ZIP / MSGBOX.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  2.9 KB  |  83 lines

  1. /* ------------------------------------------------------------------------*/
  2. /*                                                                         */
  3. /*   MSGBOX.H                                                              */
  4. /*                                                                         */
  5. /*   Copyright (c) Borland International 1991                              */
  6. /*   All Rights Reserved.                                                  */
  7. /*                                                                         */
  8. /*   defines the functions messageBox(), messageBoxRect(),                 */
  9. /*   inputBox(), and inputBoxRect()                                        */
  10. /*                                                                         */
  11. /* ------------------------------------------------------------------------*/
  12.  
  13.  
  14. #if defined( Uses_MsgBox ) && !defined( __MsgBox )
  15. #define __MsgBox
  16.  
  17. #if !defined( __STDARG_H )
  18. #include <stdarg.h>
  19. #endif  // __STDARG_H
  20.  
  21. #pragma option -Vo-
  22. #if defined( __BCOPT__ )
  23. #pragma option -po-
  24. #endif
  25.  
  26. class far TRect;
  27.  
  28. ushort messageBox( const char *msg, ushort aOptions );
  29. ushort messageBox( ushort aOptions, const char *msg, ... );
  30.  
  31. ushort messageBoxRect( const TRect &r, const char *msg, ushort aOptions );
  32. ushort messageBoxRect( const TRect &r, ushort aOptions, const char *msg, ... );
  33.  
  34. ushort inputBox( const char *Title, const char *aLabel, char *s, uchar limit );
  35.  
  36. ushort inputBoxRect( const TRect &bounds, const char *title,
  37.                      const char *aLabel, char *s, uchar limit );
  38.  
  39. const
  40.  
  41. //  Message box classes
  42.  
  43.     mfWarning      = 0x0000,       // Display a Warning box
  44.     mfError        = 0x0001,       // Dispaly a Error box
  45.     mfInformation  = 0x0002,       // Display an Information Box
  46.     mfConfirmation = 0x0003,       // Display a Confirmation Box
  47.  
  48. // Message box button flags
  49.  
  50.     mfYesButton    = 0x0100,       // Put a Yes button into the dialog
  51.     mfNoButton     = 0x0200,       // Put a No button into the dialog
  52.     mfOKButton     = 0x0400,       // Put an OK button into the dialog
  53.     mfCancelButton = 0x0800,       // Put a Cancel button into the dialog
  54.  
  55.     mfYesNoCancel  = mfYesButton | mfNoButton | mfCancelButton,
  56.                                     // Standard Yes, No, Cancel dialog
  57.     mfOKCancel     = mfOKButton | mfCancelButton;
  58.                                     // Standard OK, Cancel dialog
  59.  
  60. class MsgBoxText
  61. {
  62.  
  63. public:
  64.  
  65.     static const char * near yesText;
  66.     static const char * near noText;
  67.     static const char * near okText;
  68.     static const char * near cancelText;
  69.     static const char * near warningText;
  70.     static const char * near errorText;
  71.     static const char * near informationText;
  72.     static const char * near confirmText;
  73. };
  74.  
  75. #pragma option -Vo.
  76. #if defined( __BCOPT__ )
  77. #pragma option -po.
  78. #endif
  79.  
  80. #endif  // Uses_MsgBox
  81.  
  82.  
  83.