home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / Basic / QWINDO.ZIP / UPDATE.TXT < prev    next >
Encoding:
Text File  |  1990-01-01  |  5.1 KB  |  123 lines

  1.         QuickStart information using QuickWindows
  2.               for Microsoft QuickBASIC 4.5
  3.            (and other very important notices!)
  4.  
  5. 1. Copy all the files to your \QB directory (or whatever dir QB.EXE is in).
  6.  
  7. 2. To use QuickWindows inside the environment:
  8.     Type    QB /L QW.QLB
  9.  
  10.     Start all your programs with the following initialization commands:
  11.         REM $DYNAMIC
  12.         DEFINT a-z
  13.         CALL QWINIT(4): CALL MINIT(s,b)
  14.  
  15. 3. Try the small sample programs provided to get a feel for some of the
  16.    library functions and notice the initialization.
  17.  
  18. 4. To make an executable program using QuickWindows:
  19.    a. Select "MAKE EXE File..." from RUN menu.
  20.    b. Select Stand Alone .EXE file (QW has not been tested with BRUN)
  21.    c. BASIC will compile your program and link it with the QuickWindows
  22.       library (QW.LIB).
  23.  
  24. -----------------------------------------------------------------------------
  25. 1.  To use QuickWindows with other versions of BASIC, you'll need to make a
  26.     QuickLibrary for that BASIC.  If you are using BASIC 7.0, you'll need to
  27.     remove a stub file (the stub file used in QB 3.x/4.x resolves
  28.     external errors when the linker tries to find StringAddress and
  29.     StringLength routines, which are called within BASIC 7.0 system).
  30.  
  31.     a. For QB 3.0, type BUILDLIB qw.obj+nobasic7,qw.exe,,;
  32.  
  33.     b. For QB 4.0, type LINK /q qw.obj+nobasic7,qw.qlb,,bqlb40;
  34.  
  35.     c. For BASIC 7.0, type LINK /q qw.obj,qw.qlb,,qbxqlb;
  36.        Then remove the stub file from the .LIB file:
  37.  
  38.         LIB qw.lib   [ENTER]
  39.         Operations: -NOBASIC7.OBJ   [ENTER]
  40.         List File:    [ENTER]
  41.         Output File:    [ENTER]
  42.  
  43. 2. The method of passing arrays (integer or string) depends on the
  44.    version of QuickBASIC you are using (the manual describes the procedure
  45.    for Microsoft's QuickBASIC 4.x)...
  46.  
  47.      QuickBASIC version 3.x:
  48.      All integer and string arrays must be passed with VARPTR reference.
  49.         CALL GETSCRN(1, 1, 80, 24, VARPTR(array%(0)))
  50.         CALL WOPEN(1, 1, 80, 24, 2, &H74, "", VARPTR(scrn%(0)), 1)
  51.         CALL MENUSET(n, o, 2, &H04, &H0F, &H07, 255, VARPTR(menu$(0)))
  52.  
  53.      Format for QuickBASIC 4.x (as in the manual):
  54.      All integer arrays must be passed without VARPTR.
  55.      All string arrays must be passed with VARPTR.
  56.         CALL GETSCRN(1, 1, 80, 24, array%())
  57.         CALL WOPEN(1, 1, 80, 24, 2, &H74, "", scrn%(), 1)
  58.         CALL MENUSET(n, o, 2, &H04, &H0F, &H07, 255, VARPTR(menu$(0)))
  59.  
  60.      Format for BASIC Professional Development System:
  61.      All integer arrays must be passed without VARPTR.
  62.      All string arrays must be passed with VARPTR.
  63.         CALL GETSCRN(1, 1, 80, 24, array%())
  64.         CALL WOPEN(1, 1, 80, 24, 2, &H74, "", scrn%(), 1)
  65.         CALL MENUSET(n, o, 2, &H04, &H0F, &H07, 255, VARPTR(menu$(0)))
  66.  
  67. 3. At the beginning of all your application programs, you must initialize
  68.    QuickWindows with the following command:
  69.  
  70.      CALL QWINIT(5)         'Initializes for use with BASIC 7.0
  71.        or
  72.      CALL QWINIT(4)         'Initializes for use with QuickBASIC 4.x
  73.            or
  74.      CALL QWINIT(3)         'Initializes for use with QuickBASIC 3.0
  75.  
  76.    This sets up internal QW variables to be used with said version of
  77.    QuickBASIC.
  78.  
  79.  
  80. 4. The bug discussed on page 7 of the manual has been corrected
  81.    when using QuickWindows with QuickBASIC 4.0 and up.  However, it still
  82.    exists with QB 3.0.
  83.  
  84. 5. QuickWindows supports 43-line text mode for EGA cards.  Use BASIC's
  85.    WIDTH command to set the number of lines.  However,
  86.    when using the mouse in 43-line mode, you must make the following call
  87.    after initializing the mouse with MINIT:
  88.  
  89.     CALL MSETY(0,349)
  90.  
  91.    This allows the mouse cursor to move beyond the 25-line boundary. If a
  92.    call is made to MINIT, the limit is reset to 25-lines.
  93.  
  94. 6. BASIC has a tendency to move arrays around and as a result QuickWindows
  95.    will lose track of the array that was used to store a portion of the
  96.    screen (under a window).  To help combat this problem, make all your
  97.    arrays dynamic and DIM SHARED them in the main module.  If you want to
  98.    use them across multiple modules, make them COMMON SHARED by placing the
  99.    COMMON SHARED statement in an include file and include it at the beginning
  100.    of every module.  You can tell if an array has moved if you see garbage
  101.    on the screen when a window is closed or a menu goes away.
  102.  
  103.     Example:
  104.     'main module
  105.     COMMON SHARED w1(),w2()
  106.     DIM SHARED w1(3000),w2(2000) 'add other arrays after the window arrays
  107.  
  108.     'other modules
  109.     COMMON SHARED w1(),w2()
  110.     'do not do another DIM SHARED in other modules, only in the main.
  111.  
  112. 7. Another important guideline is to make sure your arrays are DIM'd large
  113.    enough to store that portion of the screen under a window (or menu).
  114.    The calculation of array size is (y2 - y1 +1 ) * (x2 - x1 + 1),
  115.    where (x1,y1) are upper-left coordinates of the area and (x2,y2) are
  116.    lower-right coordinates.  If the array size isn't big enough to handle the
  117.    screen contents, then QuickWindows will clobber any memory after the
  118.    said array, which could lead to program lockups or garbage appearing in
  119.    your source code.  Always be safe, save your source before running your
  120.    program.
  121.  
  122.  
  123.