home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 June / PCWorld_2002-06_cd.bin / Software / Komercni / xbase / express / exd17208.r04 / exp17 / Xdoc / Xdmain.prg < prev    next >
Text File  |  2002-01-30  |  2KB  |  97 lines

  1. /*
  2.  ╓───────────────────────────────────────────────────╖
  3.  ║  Program..: XDMAIN.PRG                            ║
  4.  ║  Author...: Roger J. Donnay                       ║
  5.  ║  Notice...: (c) DONNAY Software Designs 1987-1998 ║
  6.  ║  Date.....: Jun 10, 1998                          ║
  7.  ║  Notes....: eXPress++ Documentor main startup     ║
  8.  ╙───────────────────────────────────────────────────╜
  9.  
  10.  Must compile with /N/W
  11.  
  12. */
  13.  
  14. #include 'common.ch'
  15. #include 'std.ch'
  16. #include 'inkey.ch'
  17. #include 'set.ch'
  18. #include "xbp.ch"
  19.  
  20. FUNCTION Main ( cParam1, cParam2 )
  21.  
  22.   IF ! DC_DbeLoad( "CDXDBE",.T.)
  23.      Alert( "Database-Engine CDXDBE not loaded" , {"OK"} )
  24.   ENDIF
  25.  
  26.   IF ! DC_DbeBuild( "DBFCDX", "DBFDBE", "CDXDBE" )
  27.      Alert( "DBFCDX Database-Engine;Could not build engine" , {"OK"} )
  28.   ENDIF
  29.  
  30.   IF ! DC_DbeLoad( "FOXDBE",.T.)
  31.      Alert( "Database-Engine FOXDBE not loaded" , {"OK"} )
  32.   ENDIF
  33.  
  34.   IF ! DC_DbeBuild( "FOXCDX", "FOXDBE", "CDXDBE" )
  35.      Alert( "FOXCDX Database-Engine;Could not build engine" , {"OK"} )
  36.   ENDIF
  37.  
  38. XDoc()
  39.  
  40. RETURN nil
  41.  
  42. /* ------------- */
  43.  
  44. PROCEDURE AppSys()
  45.  
  46.   LOCAL oCrt, nAppType := AppType()
  47.  
  48.   DO CASE
  49.  
  50.     CASE .t.
  51.  
  52.     // PM Mode: create an XbpCrt instance
  53.     CASE nAppType == APPTYPE_PM
  54.  
  55.       // First active SetAppWindow() == Desktop
  56.       AppDesktop ( SetAppWindow() )
  57.  
  58.       // Create XbpCRT object
  59.       oCrt := XbpCrt():New ( NIL, NIL, { 0, 0 }, 25, 80 )
  60.       oCrt:FontWidth  := 8
  61.       oCrt:FontHeight := 16
  62.       oCrt:FontName   := "Alaska Crt"
  63.       oCrt:Title      := "eXPress++ 1.0 Alpha 1.00"
  64.       oCrt:Create()
  65.  
  66.       // Init Presentation Space
  67.       oCrt:PresSpace()
  68.  
  69.       // XbpCrt gets active window and output device
  70.       SetAppWindow ( oCrt )
  71.  
  72.   ENDCASE
  73.  
  74. RETURN
  75.  
  76. * ------------------
  77.  
  78. FUNCTION DC_DbeLoad( cDbe, lHidden )
  79.  
  80. IF AScan( dbeList(), {|a|Upper(a[1])==Upper(cDbe)}) == 0
  81.   RETURN DbeLoad( cDbe, lHidden )
  82. ENDIF
  83.  
  84. RETURN .t.
  85.  
  86. * ------------------
  87.  
  88. FUNCTION DC_DbeBuild( cCompoundDBE, cDataDBE, cOrderDBE, cRelationDBE, cDictionaryDBE )
  89.  
  90. IF AScan( dbeList(), {|a|Upper(a[1])==Upper(cCompoundDbe)}) == 0
  91.   RETURN DbeBuild( cCompoundDBE, cDataDBE, cOrderDBE, cRelationDBE, cDictionaryDBE )
  92. ENDIF
  93.  
  94. RETURN .t.
  95.  
  96.  
  97.