home *** CD-ROM | disk | FTP | other *** search
/ TestDrive Super Store 2.3 / TESTDRIVE_2.ISO / realizer / lib / stdmsgbx.rlz < prev    next >
Encoding:
Text File  |  1992-09-30  |  1.6 KB  |  67 lines

  1. '***********************************************************************
  2. '    StdMsgBx.rlz                              
  3. '
  4. '    Standard Message Box Function Library
  5. '
  6. '    Copyright ⌐ 1991-1992 Computer Associates International, Inc.
  7. '    All rights reserved.
  8. '
  9. '***********************************************************************
  10.  
  11. IF QVar(%%StdMsgBx, _Defined) THEN
  12.     EXIT MACRO
  13. END IF
  14. %%StdMsgBx = 1
  15.  
  16. RUN "StdError"
  17.  
  18. '*******  Message Box Type *******
  19. _MB_Ok = 0
  20. _MB_OkCancel = 1
  21. _MB_AbortRetryIgnore = 2
  22. _MB_YesNoCancel = 3
  23. _MB_YesNo = 4
  24. _MB_RetryCancel = 5
  25.  
  26. '******* Message Box Icon  *********
  27. _MB_Stop = 1
  28. _MB_Question = 2
  29. _MB_Exclamation = 3
  30. _MB_Information = 4
  31.  
  32. '******* Message Box Return Values *****
  33. _OK = 1
  34. _Cancel = 2
  35. _Abort = 3
  36. _Retry = 4
  37. _Ignore = 5
  38. _Yes = 6
  39. _No = 7
  40.  
  41. '*** MessageBox(asText, asCaption, rsType, rsIcon, rsDefbutton)
  42.  
  43. FUNC MessageBox(asText, asCaption, rsType, ..)
  44.     LOCAL type
  45.  
  46.     EXTERNAL "user" FUNC WinMB(WORD, POINTER, POINTER, WORD) AS INTEGER ALIAS "MessageBox"
  47.  
  48.     ECType(asText, _Alpha + _Scalar, 1)
  49.     ECType(asCaption, _Alpha + _Scalar, 2)
  50.     ECType(rsType, _Real + _Scalar, 3)
  51.     ECRange(rsType, 0, 5, 3)
  52.     ECProto(QNOptParams, 2, "MessageBox(asText, asCaption, rsType [, rsIcon [, rsDefButt]])")
  53.     type = rsType
  54.     IF QNOptParams THEN
  55.         ECType(QOptParam(1), _Real + _Scalar, 4)
  56.         ECRange(QOptParam(1), 1, 4, 3)
  57.         type = type + QOptParam(1)*16
  58.         IF QNOptParams > 1 THEN
  59.             ECType(QOptParam(2), _Real + _Scalar, 5)
  60.             ECRange(QOptParam(2), 1, 3, 5)
  61.             type = type + (QOptParam(2)-1)*256
  62.         END IF
  63.     END IF    
  64.     RETURN WinMB(LogQ(_HWnd; _PrintLog), asText, asCaption, type)
  65. END FUNC
  66.  
  67.