home *** CD-ROM | disk | FTP | other *** search
- '***********************************************************************
- ' StdMsgBx.rlz
- '
- ' Standard Message Box Function Library
- '
- ' Copyright ⌐ 1991-1992 Computer Associates International, Inc.
- ' All rights reserved.
- '
- '***********************************************************************
-
- IF QVar(%%StdMsgBx, _Defined) THEN
- EXIT MACRO
- END IF
- %%StdMsgBx = 1
-
- RUN "StdError"
-
- '******* Message Box Type *******
- _MB_Ok = 0
- _MB_OkCancel = 1
- _MB_AbortRetryIgnore = 2
- _MB_YesNoCancel = 3
- _MB_YesNo = 4
- _MB_RetryCancel = 5
-
- '******* Message Box Icon *********
- _MB_Stop = 1
- _MB_Question = 2
- _MB_Exclamation = 3
- _MB_Information = 4
-
- '******* Message Box Return Values *****
- _OK = 1
- _Cancel = 2
- _Abort = 3
- _Retry = 4
- _Ignore = 5
- _Yes = 6
- _No = 7
-
- '*** MessageBox(asText, asCaption, rsType, rsIcon, rsDefbutton)
-
- FUNC MessageBox(asText, asCaption, rsType, ..)
- LOCAL type
-
- EXTERNAL "user" FUNC WinMB(WORD, POINTER, POINTER, WORD) AS INTEGER ALIAS "MessageBox"
-
- ECType(asText, _Alpha + _Scalar, 1)
- ECType(asCaption, _Alpha + _Scalar, 2)
- ECType(rsType, _Real + _Scalar, 3)
- ECRange(rsType, 0, 5, 3)
- ECProto(QNOptParams, 2, "MessageBox(asText, asCaption, rsType [, rsIcon [, rsDefButt]])")
- type = rsType
- IF QNOptParams THEN
- ECType(QOptParam(1), _Real + _Scalar, 4)
- ECRange(QOptParam(1), 1, 4, 3)
- type = type + QOptParam(1)*16
- IF QNOptParams > 1 THEN
- ECType(QOptParam(2), _Real + _Scalar, 5)
- ECRange(QOptParam(2), 1, 3, 5)
- type = type + (QOptParam(2)-1)*256
- END IF
- END IF
- RETURN WinMB(LogQ(_HWnd; _PrintLog), asText, asCaption, type)
- END FUNC
-
-