home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xmsgbox.h < prev    next >
Text File  |  1998-02-22  |  3KB  |  81 lines

  1. #ifndef __OOL_XMSGBOX_H__
  2. #define __OOL_XMSGBOX_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XMessageBox                           */
  8. /*                       derived from: XObject                               */
  9. /*                        last update: 9/96                                  */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13.  
  14. #include "xobject.h"
  15. #include "XRes.h"
  16. #include "XWindow.h"
  17.  
  18. #define MBOX_OK               0x0000
  19. #define MBOX_OKCANCEL         0x0001
  20. #define MBOX_RETRYCANCEL      0x0002
  21. #define MBOX_ABORTRETRYIGNORE 0x0003
  22. #define MBOX_YESNO            0x0004
  23. #define MBOX_YESNOCANCEL      0x0005
  24. #define MBOX_CANCEL           0x0006
  25. #define MBOX_ENTER            0x0007
  26. #define MBOX_ENTERCANCEL      0x0008
  27.  
  28. #define MBOX_NOICON           0x0000
  29. #define MBOX_CUANOTIFICATION  0x0000
  30. #define MBOX_CUAWARNING       0x0020
  31. #define MBOX_ICONQUESTION     0x0010
  32. #define MBOX_ICONEXCLAMATION  0x0020
  33. #define MBOX_ICONASTERISK     0x0030
  34. #define MBOX_ICONHAND         0x0040
  35. #define MBOX_CUACRITICAL      0x0040
  36. #define MBOX_QUERY            MBOX_ICONQUESTION
  37. #define MBOX_WARNING          MBOX_CUAWARNING
  38. #define MBOX_INFORMATION      MBOX_ICONASTERISK
  39. #define MBOX_CRITICAL         MBOX_CUACRITICAL
  40. #define MBOX_ERROR            MBOX_CRITICAL
  41. #define MBOX_CUSTOMICON       0x0080
  42.  
  43. #define MBOX_DEFBUTTON1       0x0000
  44. #define MBOX_DEFBUTTON2       0x0100
  45. #define MBOX_DEFBUTTON3       0x0200
  46.  
  47. #define MBOX_APPLMODAL        0x0000
  48. #define MBOX_SYSTEMMODAL      0x1000
  49. #define MBOX_HELP             0x2000
  50. #define MBOX_MOVEABLE         0x4000
  51. #define MBOX_NONMODAL         0x8000
  52.  
  53. #define MDID_OK               1
  54. #define MDID_CANCEL           2
  55. #define MDID_ABORT            3
  56. #define MDID_RETRY            4
  57. #define MDID_IGNORE           5
  58. #define MDID_YES              6
  59. #define MDID_NO               7
  60. #define MDID_HELP             8
  61. #define MDID_ENTER            9
  62. #define MDID_ERROR            0xffff
  63.  
  64.  
  65. class _export_ XMessageBox: public XObject
  66. {
  67.    private:
  68.      USHORT res;
  69.    public:
  70.      XMessageBox( const char *, const char * = NULL, const ULONG style = MBOX_OK , const XWindow * owner = NULL, const ULONG id = 0);
  71.      XMessageBox( const XResource * ms1, const XResource * ms2 = NULL, const ULONG style = MB_OK , const XWindow * owner = NULL, const ULONG id = 0);
  72.      virtual ~XMessageBox() {;}
  73.      USHORT GetCommand( void ) const { return res; }
  74. };
  75.  
  76.  
  77. LONG XShowMessage( const char * s, const char * s2 = NULL, const ULONG style = MB_OK|MB_ERROR, const XWindow * owner=NULL);
  78. LONG XShowMessage( const char * s, const ULONG style = MB_OK|MB_ERROR, const XWindow * owner=NULL);
  79.  
  80. #endif
  81.