LEdit OWL wrapper V2.05
Copyright (C) 1996 Andrey B. Yastrebov
Distributed by TechnoSoft, Inc.

IMPORTANT!!! LEdit OWL wrapper was tested for Borland Object Windows
Library version 2.50 (BC++ 4.5). It worked also with OWL 2.00 (BC++ 4.0).
It assumes LARGE memory model.

In order to use LEdit OWL wrapper you need first install LEDIT.DLL
as explained in file LEDIT__I.TXT from LEDIT subdirectory.

The following files matters when installing OWL wrapper:

LEOWL.DEF - Typical *.DEF file to be used with applications involving
LEOWL.H   - C++ header file, which serves at the same time as a
            documentation file. You may want to put it into your
            \INCLUDE directory. It's not enough to have this file.
            You'll need LEDIT.H (and LEDIT.LIB) either.
LEOWL.LIB - The wrapper itself. The library is build for dynamical
            inclusion of standard C++/OWL libraries and can't be
            used with other variants. Don't worry if you need others,
            registered users are given its source code. If you have
            troubles read below "How to build OWL example(s)". If
            you still have troubles, register OWL wrapper and take
            source code.
*********************************************************************
Important!!! Instead of LEOWL.LIB the package includes four librtaries

LEOWL16A.LIB - 16-bit target with BC++ 4.0
LEOWL32A.LIB - 32-bit target with BC++ 4.0
LEOWL16B.LIB - 16-bit target with BC++ 4.5
LEOWL32B.LIB - 32-bit target with BC++ 4.5

You'll need only one of them that is appropriate.
*********************************************************************
LEOWL.TXT - Important information about LEdit OWL wrapper
LEOWL__I.TXT - This file
LEOWL__U.TXT - Changes track from first release

LEDIT_x*.* where x stands for number 1 to 6 - examples of using
           OWL wrapper.

           1) SDI editor with persistent desktop (LEdit streamed by Ref)

           2) MDI editor with persistent desktop (LEdit streamed by Pointer)

           3) LEdit inside dialog and how to transfer text

           4) Syntax highlighting and work with syntax

           5) Drawing on LEdit's background

           6) LEdit inside Document/View architecture

How to build OWL example(s)?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Follow the steps:

- Edit file "leowl.h"
  Set definition of Borland C++ version like
#define BC45 // For BC++ 4.5 - Currently set
  or
#define BC40 // For BC++ 4.0

- In BC++ chose "Project"/"New Project"

- When dialog appears

    - enter project file name leowl_N.ide, where N should be
        substituted with example number.

    - set "Target Type" to "Application [.exe]"

    - set "Platform" to "Windows 3.x" or "Win32"

    - set "Target Model" to "Large"

    - check "Stat

    - check "Dynamic" radio button instead of "Static"

    - check "OWL", "Class library" end "Run-time" under "Standard
       Libraries" title

    - press "Advanced" button and uncheck all boxes in the dialog
       that appear.

    - press "OK" button

- Click right mouse button on the new project window and chose
   "Add Node". When file chose dialog appears enter file mask
   leowl_N*.* (where N stands for example number) and select
   all matching files.

- By the same way add to the project files ledit.lib (should be
   in LEDIT subdirectory) and leowl.lib (should be in LEOWL
   subdirectory).

- Make sure that files ledit.h and leowl.h are in the same
   directory as project files or copy them there.

- Make sure ledit.dll file is in the project directory or
   (better) in WINDOWS/SYSTEM directory.

- Check your option setting by chosing "Options"/"Project".
  Critical ones are listed below:

  - "16-bit Compiler"/"Processor"/"Data alignement" - "Byte"
  - "16-bit Compiler"/"Calling conventions" - "C"
  - "16-bit Compiler"/"Memory Model" - "Large"
  - "16-bit Compiler"/"Entry/Exit Code" - "Windows smart callbacks"
  - "32-bit Compiler"/"Processor"/"Data alignement" - "Byte"
  - "32-bit Compiler"/"Calling conventions" - "C"
  - "C++ Options"/"Member Pointer" - "Support all cases"
  - "C++ Options"/"C++ Compatibility"/"Virtual Base Pointers" - "Always near"
  - "C++ Options"/"C++ Compatibility" - all unchecked
  - "C++ Options"/"Virtual Tables" - "Smart"
  - "C++ Options"/"Templates" - "Smart"
  - "C++ Options"/"RTTI" - "Enable run-time information"
  - "Resources" - "Windows 3.1" or "Win32"

- Build project and run example by pressing Ctrl+F9.
------------------------------------------------------------------------

Please, read the following text before using LEDit OWL
wrapper:

!!!ATTENTION!!!=========================
   Very Important
   ========================================
      Bugs in BC++ 4.5 (And may be BC++ 4.0)
      ========================================
1) ------------------------------------
DESCRIPTION: Some objects aren't streamed properly
EXAMPLES AFFECTED: leowl_2
CAUSE: When BC++ streams object by pointers it uses TPWrittenObjects
  object database to register which ones are streamed and which one not.
  It maintain this database sorted by pointers to objects. The operation
  "<" is defined incorrectly by simply rereferring to the pointers. In
  large memory model this doesn't give complete ordering because some
  far pointer can't be compared. So, some objects don't register with
  database properly. This is especially true with large objects like
  TLEdit, which are allocated in global memory. Their pointers usually
  have different segments and the same offset. That's what's causing
  error in database registration most probably.

FIX: You need to follow the steps:

- change file (C++ directory)\INCLUDE\CLASSLIB\OBJSTRM as follow:

   - find the description of TPWrittenObjects class
   - find the description of TPWObj class inside
   - find the definition of "<" operation.
   - replace line

            { return o1.Address < o2.Address; }

   - with the text:

     #if defined(BI_DATA_FAR)
       { return (((long) o1.Address) < ((long) o2.Address)); }
     #else
       { return o1.Address < o2.Address; }
     #endif

- rebuild class libraries as explained in BC++ documentation
- rebuild OWL library as explained in BC++ documentation

2) ------------------------------------
DESCRIPTION: TEditView and TListView don't work properly with
files larger than 32(64)K. They either truncate them without
notice or eventually crashes them.
EXAMPLES AFFECTED: leowl_6
CAUSE: I think this is because such files aren't supposed to be
       used with these views
FIX: Use LEditView instead :)
========================================