home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- * * 09/92 showbox.prg *
- *****************************************************************
- * * Author's Name: Jeb Long *
- * * *
- * * Description: *
- * * ShowBox.PRG illustrates how to use FOXTOOLS.DLL *
- * to call a typical Windows API function *
- *****************************************************************
- * The #define statements came from the windows.h header
- * file that comes with C compilers. The following statements
- * define combinations of push buttons that are produced by
- * the MessageBox function:
- #define MB_OK 0
- #define MB_OKCANCEL 1
- #define MB_ABORTRETRYIGNORE 2
- #define MB_YESNOCANCEL 3
- #define MB_YESNO 4
- #define MB_RETRYCANCEL 5
-
- * Following #defines available Icons that can be used
-
- #define MB_ICONHAND 16
- #define MB_ICONQUESTION 32
- #define MB_ICONEXCLAMATION 48
- #define MB_ICONASTERISK 64
-
- SET LIBRARY TO (SYS(2004)+"FOXTOOLS") && Load CALLDLLS.DLL Library
-
- msgboxRN = RegFn( "MessageBox", "ICCI","I" , "user.exe")
- ************************************************************
- * Syntax for Windows API MessageBox() function
- * int Messagebox( HWndParent, lptext, lpCaption, wType )
- * HWndParent - Handle to parent window (msgboxRN)
- * lptext - Text in box
- * lpCaption - Message box window title
- * wType - Specifies icon and type of buttons OR'ed
- * together.
- *************************************************************
- result = CallFn(msgboxRN, 0, "Do you want to answer",;
- "Ask The User", MB_YESNO + MB_ICONQUESTION)
-
- WAIT WINDOW "User says: " + iif(result = 6, "Yes", "No")
- * ...
- RETURN
-