home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / IShield for Visual C++ 6.0 / DATA1.CAB / Include_Files / SDWEL.RUL < prev    next >
Encoding:
Text File  |  1997-11-20  |  4.2 KB  |  112 lines

  1.  
  2.  /*=======================================================================*/
  3.  /*                                                                       */
  4.  /*           (c) InstallShield Software Corporation (1996-1997)          */
  5.  /*            (c)  InstallShield Corporation  (1990-1996)                */
  6.  /*                       Schaumburg, Illinois 60173                      */
  7.  /*                          All Rights Reserved                          */
  8.  /*                           InstallShield (R)                           */
  9.  /*                                                                       */
  10.  /*   File    : sdwel.rul                                                 */
  11.  /*                                                                       */
  12.  /*   Purpose : This file contains the code for the SdWelcome             */
  13.  /*             script dialog function.                                   */
  14.  /*                                                                       */
  15.  /*=======================================================================*/
  16.  
  17.  /*------------------------------------------------------------------------*/
  18.  /*                                                                        */
  19.  /*   Function: SdWelcome                                                  */
  20.  /*                                                                        */
  21.  /*   Descrip:  This dialog will show the welcome message to the user.     */
  22.  /*                                                                        */
  23.  /*   Misc:                                                                */
  24.  /*                                                                        */
  25.  /*------------------------------------------------------------------------*/
  26. function SdWelcome(szTitle, szMsg)
  27.           STRING  szDlg, szTemp;
  28.           NUMBER  nId, nMessage, nTemp;
  29.           HWND    hwndDlg;
  30.           BOOL    bDone;
  31.         begin
  32.  
  33.           szDlg     = SD_DLG_WELCOME;
  34.           nSdDialog = SD_NDLG_WELCOME;
  35.  
  36.            // record data produced by this dialog
  37.            if (MODE=SILENTMODE) then
  38.              SdMakeName( szAppKey, szDlg, szTitle, nSdWelcome );
  39.              SilentReadData( szAppKey, "Result", DATA_NUMBER, szTemp, nId );
  40.              return nId;
  41.            endif;
  42.  
  43.  
  44.           // ensure general initialization is complete
  45.           if (!bSdInit) then
  46.              SdInit();
  47.           endif;
  48.  
  49.           if (EzDefineDialog( szDlg, "", "", SD_NDLG_WELCOME ) = DLG_ERR) then
  50.               return -1;
  51.           endif;
  52.  
  53.           // Loop in dialog until the user selects a standard button
  54.           bDone = FALSE;
  55.  
  56.           while (!bDone)
  57.  
  58.              nId = WaitOnDialog( szDlg );
  59.  
  60.              switch(nId)
  61.              case DLG_INIT:
  62.                   // Put the corresponding Info in the List Field
  63.                   if( szMsg != "" ) then
  64.                       SdSetStatic(szDlg, SD_STA_MSG, szMsg);
  65.                   endif;
  66.  
  67.                   hwndDlg = CmdGetHwndDlg( szDlg );
  68.                   SdGeneralInit( szDlg, hwndDlg, STYLE_NORMAL, szSdProduct );
  69.  
  70.                   if(szTitle != "") then
  71.                        SetWindowText(hwndDlg, szTitle);
  72.                   endif;
  73.  
  74.              case NEXT:
  75.                   nId    = NEXT;
  76.                   bDone  = TRUE;
  77.  
  78.               case BACK:
  79.                    nId    = BACK;
  80.                    bDone  = TRUE;
  81.  
  82.              case DLG_ERR:
  83.                   SdError( -1, "SdWelcome" );
  84.                   nId    = -1;
  85.                   bDone  = TRUE;
  86.  
  87.              case DLG_CLOSE:
  88.                   SdCloseDlg( hwndDlg, nId, bDone );
  89.  
  90.              default:
  91.                   // check standard handling
  92.                    if (SdIsStdButton( nId ) && SdDoStdButton( nId )) then
  93.                       bDone = TRUE;
  94.                   endif;
  95.              endswitch;
  96.  
  97.           endwhile;
  98.  
  99.           EndDialog( szDlg );
  100.           ReleaseDialog( szDlg );
  101.  
  102.           SdUnInit( );
  103.  
  104.           // record data produced by this dialog
  105.           SdMakeName( szAppKey, szDlg, szTitle, nSdWelcome );
  106.           SilentWriteData( szAppKey, "Result", DATA_NUMBER, "", nId );
  107.  
  108.           return nId;
  109.  
  110.        end;
  111.  
  112.