================================================
README.TXT FOR TKOFAX TOOLKIT Version 1.0
================================================

Company Information:

     Larry Klein
     Principal
     LCK Consulting
     732 Symphony Woods Drive
     Silver Spring, MD  20901
     Phone: 301-593-2745
     Fax: 301-593-4262
     Compuserve: 76330,2525
     Compuserve Shareware Registration #: 793


If this program is utilized to your satisfaction, a $20
shareware fee can be sent to the above address.  Or, you can
register using Compuserve's shareware registration facility.
To access Compuserve's shareware facility, type GO SWREG
from the Compuserve command line.  The TKOFAX Toolkit is
registration number 793.  This fee will go towards upgrading
the product.  Your name and address will be placed on a
mailing list for further upgrades.  Where possible, include
any bulletin board address to which notifications can be
sent.

================================================

This product was developed by LCK Consulting as shareware
for general use. This software and associated documentation
are provided "as-is" and without any express or implied
warranties whatsoever.  The user is advised to test the
program thoroughly before relying on it.  The user assumes
the entire risk of using the program. In no event shall LCK
Consulting be liable for any damages whatsoever arising out
of the use or inability to use this program.

The TKofax toolkit makes use of Kofax KIPP Library.
Permission from Kofax Image Products has been granted to
include the necessary components of the Kofax KIPP toolkit
in order to get a developer started with actual applications
using the TKofax toolkit.  However, the Kofax KIPP
development toolkit must be purchased from Kofax Image
Products in order to extend the functionality of the TKofax
toolkit.

The following disclaimer applies to Kofax Image Products,
the developer of the Kofax KIPP library.

"SHAREWARE" refers to a software application, component(s),
or library that is distributed at no cost to the general
public.  "PUBLISHER" is a developer, programmer, or
organization that develops SHAREWARE.

1. KOFAX IMAGE PRODUCTS DOES NOT AND WILL NOT SUPPORT THE
SHAREWARE CONTAINED IN THIS ARCHIVE.

2. IN NO EVENT SHALL KOFAX IMAGE PRODUCTS BE LIABLE FOR ANY
DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES
FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OUT
OF THE USE OF OR INABILITY TO USE THIS SHAREWARE, WHETHER IN
AN ACTION BASED ON CONTRACT OR TORT, INCLUDING NEGLIGENCE OR
STRICT LIABILITY, EVEN IF KOFAX IMAGE PRODUCTS HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  BECAUSE SOME
JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF
LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE
LIMITATION MAY NOT APPLY TO YOU.

================================================

Kofax Image Products Information:

     Kofax Image Products
     3 Jenner Street
     Irvine, California  92718
     Telephone: (714) 727-1733
     Fax: (714) 727-3144


================================================

Installation
------------

1)   Create a directory (e.g., \TKOFAXSW) and place the
     directory on your path (if you are already in Windows,
     you must add this to your path outside of Windows and
     restart Windows)
2)   Copy and unzip the KOFAX.ZIP file
3)   Copy all .H files to an INCLUDE path on your disk
4)   Copy all .LIB files to the LIB path on your disk
5)   Copy all .DLL files to the Windows \SYSTEM directory
6)   Copy the .VBX file to the Windows \SYSTEM directory
7)   Copy the .FLT files to the Windows \SYSTEM directory
8)   Copy the KSE.EXE file to the Windows \SYSTEM directory
9)   Copy VKFD.386 to the Windows \SYSTEM directory and add
     the following line to the SYSTEM.INI file:

          DEVICE = VKFD.386

10)  Make a directory to store all the OWL example source
     files under the TKofax directory (e.g., \TKOFAXSW\OWL)
11)  Copy all files beginning with OWLEX to the OWL example
     directory
12)  Make a directory to store all the Visual Basic example
     source files under the TKofax directory (e.g.,
     \TKOFAXSW\VB)
13)  Copy all files beginning with VBEXAMP to the Visual
     Basic example directory

          NOTE: YOU MUST HAVE CMDIALOG.VBX, VBRUN200.DLL and
          COMMDLG.DLL to use the example Visual Basic
          program VBEXAMP.EXE that is included in this
          package
          
14)  The .IMG and .TIF files are example images

================================================



Overview
--------

The TKofax toolkit is designed to simplify displaying,
scanning and printing images using the Kofax image engine.
The Kofax image engine, developed by Kofax Image Products,
is a leading PC-based image engine that provides scalable
and powerful image-handling capabilities.  By leveraging a
tried-and-tested image engine, TKofax can be used equally
well for simple image-based application prototypes, as well
as for robust, high-end applications and products.


Summary of Kofax Image Engine Capabilities
------------------------------------------

The Kofax image engine is designed as a scalable, full-
featured image engine.  The Kofax image engine can operate
as a software-only, as well as a hardware-enhanced, toolkit.
If the engine detects a Kofax add-in card, it will make use
of the device as necessary.  For example, although you can
display images without a Kofax image card, having one
installed will likely speed the compression/decompression
process necessary to display images.  Whether the Kofax
image engine utilizes a hardware card if it is available, or
relies on a DLL to perform the image display routines, is
transparent to the developer, and of course to the user.
The Kofax image engine will leverage resources depending on
what is available.

The Kofax engine is also powerful in that the same calls are
used for low- and high-end devices.  For example, printing
to a 50 PPM printer uses identical calls as to a 4 PPM
printer.  Writing an application that is scalable is
therefore built-in.  Whatever functionality is designed for
a low-end facility will work just as well on a high-end
facility, just faster and generally with better quality
results.

Additionally, the Kofax image engine is capable of working
with a variety of image types.  Several image filters are
included with the toolkit that enable access to all TIFF
formats, as well as IMG, PCX and EMS formats.  The Kofax
image engine is not confined to just these image formats,
since it allows developers to create their own filters for
image formats that are not supported by Kofax Image Products
directly.


Summary of TKofax Toolkit Features
----------------------------------

TKofax was designed to simplify communications with the
Kofax image engine.  Like any sophisticated engine, for many
developers Kofax will take weeks, and even months, to
master.  The TKofax toolkit provides classes, a custom
control, a VBX file, as well as sample programs to jump-
start developing applications that are "image-enabled".
Working with the TKofax toolkit is like working with any
standard Windows control, such as the edit or listbox
controls -- it is that simple!  Additionally, TKofax adds
several common dialogs that are needed for image
manipulation.

The TKofax toolkit was designed to provide the full
complement of Kofax engine capabilities through a Windows-
registered control, and as separate object classes.  The
object classes can be used as an object-oriented facility
that manages most aspects of the Kofax engine overhead and
complexity.  The object classes are complemented by
registered Windows controls that can be created on-the-fly,
or "painted" using a dialog creating facility, such as
Resource Workshop.  Additionally, there is a VBX control for
Visual Basic users that provides a wide variety of built-in
capabilities.

As well, built-in dialog boxes that can prompt users to
change scaling and display options for images being
displayed are included.  When either the custom control or
the VBX is used, the developer can easily enable users to
manipulate how the image is presented using built-in dialog
boxes.  Also, "zooming" on images is built-in.  These
combined features enable a developer to allow users to set
the scaling (horizontal and vertical separately), rotation,
sizing, and tone of images displayed -- with minimal effort!

In this version, all the facilities described above have
been implemented for displaying images, with less support
for scanning and printing.  This is mostly due to the level
of software-only support provided by Kofax.  Kofax currently
only has full software-only support for displaying images.
To print or scan images using the Kofax engine requires a
Kofax device card.  Since most users of this toolkit will
likely start out as strictly software installations (that
is, without Kofax device cards installed on computers that
need to manipulate images), and eventually migrate to more
sophisticated installations as the need arises, the natural
emphasis was on display.  However, the toolkit can still be
used to scan and print images, so long as a Kofax card is
installed on the computer that requires these facilities.

Kofax Image Products will be releasing a set of DLLs that
will enable software-only access to scanning and printing in
the near future.  When that is available the complimentary
TKofax controls will also be available.


Using TKofax With Borland C++
-----------------------------

The TKofax toolkit includes two separate classes: a generic
object class for generic image manipulation, and an OWL-
derived image control class.  The generic class is designed
for developers that are familiar with Kofax's engine, but
would like to simplify access using an object class.  The
TKofax toolkit class for this purpose is called "TKofax".
For developers that prefer the OWL paradigm, the TKofax
toolkit includes an OWL-derived class, called
"TKofaxDisplay".

The "TKofax" object class was designed to facilitate
communication with the Kofax engine at three levels.  At the
lowest level the "TKofax" object class will manage error
checking, validation and administrative overhead necessary
to deal with the Kofax engine.  However, a developer will
have to be well versed with the native Kofax engine to make
effective use of the TKofax toolkit at this level.  All
calls at this level start with Kofax..., such as
KofaxOpenImage(), KofaxCloseImage(), and represent parallel
calls of the Kofax engine.  The next higher level of
communication is using the "TKofax" object class member
functions that combine several steps into one, thereby
simplifying the effort required to execute many common
tasks.  These member functions all begin with TKofax...,
such as TKofaxDisplayImage(), TKofaxScanImage().  Finally,
there are single-call functions that do a complete task in
one step, such as displaying an image using a developer-
provided set of display options.  These calls begin with
Instant..., such as InstantDisplayImage(),
InstantPrintImage().

The second class available with the TKofax toolkit is
derived from the OWL-based TControl class, and is called
"TKofaxDisplay".  This class operates identically to all
other OWL-based classes, and greatly simplifies
communication with the Kofax engine.  To use the
"TKofaxDisplay" OWL-based class, simply add the TKofax DLL
to the Resource Workshop using the Options | Install Control
Library menu option, and the "TKofaxDisplay" control becomes
just one more icon on the Tools toolbox.  Place a
"TKofaxDisplay" control within a dialog, and use the dialog-
based constructor to access the image control from within
your application.  Communicating with the control can be
done either using the custom messages, or using the
available member functions.  All supported messages have an
associated member function.  Refer to the Function Reference
below for more details.

TKofax includes built-in dialog prompts so that getting
started requires minimal programming.  The current built-in
dialog prompts are for setting the scaling and display
options for any image being displayed.


Using TKofax with Visual Basic
------------------------------

Any image manipulation can be done using a special VBX file,
called VBKOFAX.VBX.  This file should be accessible from the
path, or the windows \SYSTEM directory.  To use VBKOFAX, add
the VBKOFAX.VBX to your project.  Properties are available
at runtime, including the ability to set images, manipulate
image display, and access built-in prompts so that users can
manipulate images.  Refer to the Function Reference section
on Visual Basic Properties below for more details.



TKofax Object Class Function Reference
--------------------------------------

     Data Members
     ------------

FileName       LPSTR     FileName

               Name of file being manipulated.



dwDisplayOptions    DWORD     dwDisplayOptions

               Options used when redisplaying images.


     Member Functions
     ----------------

constructor    TKofax(WORD AFilterType)

               Constructor based on image type.  Valid image
               types are: TKOFAXFILTER_TIFF,
               TKOFAXFILTER_EMS, TKOFAXFILTER_PCX and
               TKOFAXFILTER_IMG.


constructor    TKofax(LPSTR AImageFile)

               Constructor based on filename.  The
               contructor determines the image type (and
               thereby what filter to use) based on the file
               extension.


FreeImageLibrary    void      FreeImageLibrary()

               Frees the image library and associated
               overhead.


LoadImageLibrary    BOOL      LoadImageLibrary()

               Loads the image library necessary for the
               image type specified in the constructor.  All
               engine activity must be preceded by a call to
               this function.  Return TRUE upon success.
               Displays the text of an error in case of
               failure, and returns FALSE.



KofaxCloseImage     int  KofaxCloseImage()

               Closes the currently open image.  Will check
               first if there is an available image to
               close.  Returns KER_OK on success.  Displays
               the text of an error in case of failure, and
               returns the actual error code.


KofaxCreateImage    int  KofaxCreateImage()

               Creates a new image.  Will check first if
               there is an available image to close.
               Returns KER_OK on success.  Displays the text
               of an error in case of failure, and returns
               the actual error code.


KofaxCreateImageDesc     int  KofaxCreateImageDesc()

               Allocates storage for an image descriptor and
               associates it with an image filter.  Returns
               KER_OK on success.  Displays the text of an
               error in case of failure, and returns the
               actual error code.


KofaxCreatePrintSpec     HPRTSPEC  KofaxCreatePrintSpec()

               Allocates a printer specification.  Returns a
               non-NULL value upon success.  Displays the
               text of an error in case of failure, and
               returns NULL.


KofaxCreateScanSpec HSCNSPEC  KofaxCreateScanSpec()

               Allocates a scanner specification.  Returns a
               non-NULL value upon success.  Displays the
               text of an error in case of failure, and
               returns NULL.


KofaxDeleteImageDesc     int  KofaxDeleteImageDesc()

               Releases memory of an unneeded image
               descriptor.  Returns KER_OK on success.
               Displays the text of an error in case of
               failure, and returns the actual error code.


KofaxDeletePrintSpec     int  KofaxDeletePrintSpec()

               Releases memory occupied by an unneeded print
               spec.  Returns KER_OK on success.  Displays
               the text of an error in case of failure, and
               returns the actual error code.


KofaxDeleteScanSpec int  KofaxDeleteScanSpec()

               Releases memory occupied by an unneeded scan
               spec.  Returns KER_OK on success.  Displays
               the text of an error in case of failure, and
               returns the actual error code.


KofaxDisplayImage   int  KofaxDisplayImage(LPRECT lpSrcRect,
               HDC hDestDC, HWND hWnd, LPRECT lpDestRect,
               LPRECT lpClipRect, int xOffset, int yOffset,
               LPXYSCALE lpScale, DWORD dwOpt)

               Displays an image according to the specified
               display options.  These include the source
               rectangle (lpSrcRect), Windows display
               context (hDestDC), target window (hWnd),
               destination rectangle (lpDestRect), clipping
               rectangle (lpClipRect), horizontal and
               vertical image offset (xOffset, yOffset),
               scaling factor (lpScale) and display options
               (dwOpt).  Refer to the Kofax manual for more
               details on the display options.  Returns
               KER_OK on success.  Displays the text of an
               error in case of failure, and returns the
               actual error code.


KofaxGetImageAttr   DWORD     KofaxGetImageAttr(WORD
               Attribute)

               Enables the user to examine the current
               condition of an image.  Return the code for
               the attribute being examined (Attribute).
               Displays the text of an error in case of
               failure.


KofaxGetScanParam   DWORD     KofaxGetScanParam(WORD
               wParamId)

               Enables the user to examine the current
               scanner settings.  Return the code for the
               attribute being examined (wParamId).
               Displays the text of an error in case of
               failure.


KofaxOpenImage int  KofaxOpenImage()

               Opens the current image.  Returns KER_OK on
               success.  Displays the text of an error in
               case of failure, and returns the actual error
               code.


KofaxPrintImage     int  KofaxPrintImage(DWORD dwOpt)

               Prints the current image using the options
               specified (dwOpt).  Returns KER_OK on
               success.  Displays the text of an error in
               case of failure, and returns the actual error
               code.


KofaxReadPrinterSettings int  KofaxReadPrinterSettings()

               Reads the current printer settings.  Must be
               used prior to a call to KofaxGetPrintParam.
               Returns KER_OK on success.  Displays the text
               of an error in case of failure, and returns
               the actual error code.


KofaxReadScannerSettings int  KofaxReadScannerSettings()

               Reads the current scanner settings.  Must be
               used prior to a call to KofaxGetScanParam.
               Returns KER_OK on success.  Displays the text
               of an error in case of failure, and returns
               the actual error code.


KofaxReservePrintEngine  int  KofaxReservePrintEngine()

               Reserves the print engine.  Must be called
               prior to printing.  Returns KER_OK on
               success.  Displays the text of an error in
               case of failure, and returns the actual error
               code.


KofaxScanImage int  KofaxScanImage(DWORD dwOpt = KSC_NONE)

               Scans the current image using the options
               specified (dwOpt).  Returns KER_OK on
               success.  Displays the text of an error in
               case of failure, and returns the actual error
               code.


KofaxSetImageAttr   DWORD     KofaxSetImageAttr(WORD
               wAttrId, DWORD dwValue)

               Sets the attribute (wAttrId) with the
               specified value (dwValue) for an image spec.
               Must be preceded with a call to
               KofaxCreateImage().  Returns the old value
               for the attribute being set.  Displays the
               text of an error in case of failure.


KofaxSetPrintParam  DWORD     KofaxSetPrintParam(WORD
               wParamId, DWORD dwValue)

               Sets the attribute (wParamId) with the
               specified value (dwValue) for a printer spec.
               Must be preceded with a call to
               KofaxReadPrinterSettings().  Returns the old
               value for the attribute being set.  Displays
               the text of an error in case of failure.


KofaxSetScanParam   DWORD     KofaxSetScanParam(WORD
               wParamId, DWORD dwValue)

               Sets the attribute (wParamId) with the
               specified value (dwValue) for a scanner spec.
               Must be preceded with a call to
               KofaxReadScannerSettings().  Returns the old
               value for the attribute being set.  Displays
               the text of an error in case of failure.


KofaxUnreservePrintEngine     int
               KofaxUnreservePrintEngine()

               Frees the print engine for subsequent
               printing.  Returns KER_OK on success.
               Displays the text of an error in case of
               failure, and returns the actual error code.


KofaxWritePrinterSettings     int
               KofaxWritePrinterSettings()

               Writes the printer settings, after reading it
               using KofaxReadPrinterSettings() and updating
               it using KofaxSetPrintParam().  Returns
               KER_OK on success.  Displays the text of an
               error in case of failure, and returns the
               actual error code.


KofaxWriteScannerSettings int KofaxWriteScannerSettings();

               Writes the scanner settings, after reading it
               using KofaxReadScannerSettings() and updating
               it using KofaxSetScanParam().  Returns KER_OK
               on success.  Displays the text of an error in
               case of failure, and returns the actual error
               code.


TKofaxDisplayImage  int  TKofaxDisplayImage(LPRECT
               lpSrcRect, HDC hDestDC, HWND hWnd, LPRECT
               lpDestRect, LPRECT lpClipRect, int xOffset,
               int yOffset, LPXYSCALE lpScale, DWORD dwOpt)

               Sets the image spec to the current image
               file, opens the image file, displays it using
               KofaxDisplayImage(), and closes the image.
               Return the value of KofaxDisplayImage().


TKofaxGetImageAttr  DWORD     TKofaxGetImageAttr(WORD
               wAttrId)

               Sets the image spec to the current image
               file, opens the image file, gets the image
               attribute (wAttrId) using
               KofaxGetImageAttr(), and closes the image.
               Return the value of KofaxGetImageAttr().


TKofaxPrintImage    int  TKofaxPrintImage(DWORD dwOpt)

               Sets the image spec to the current image
               file, opens the image file, prints the image
               using the options specified (dwOpt) using
               KofaxPrintImage(), and closes the image.
               Return the value of KofaxPrintImage().


TKofaxReleaseScanner int TKofaxReleaseScanner()

               Removes the scan spec by calling
               KofaxDeleteScanSpec().  Returns the result of
               KofaxDeleteScanSpec().


TKofaxReservePrintEngine int  TKofaxReservePrintEngine()

               Creates a print spec, reserves the print
               engine and sets printer defaults for
               printing.  Returns KER_OK on success.
               Displays the text of an error in case of
               failure, and returns the actual error code.


TKofaxScanImage     int  TKofaxScanImage(DWORD dwOpt =
               KSC_NONE)

               Sets the image spec to the current image
               file, opens the image file, scans the image
               using the options specified (dwOpt) using
               KofaxScanImage(), and closes the image.
               Return the value of KofaxScanImage().


TKofaxSetupScanner  int  TKofaxSetupScanner()

               Creates a scan spec, and sets up the scanner
               defaults.  Returns KER_OK on success.
               Displays the text of an error in case of
               failure, and returns the actual error code.


TKofaxUnreservePrintEngine    int
               TKofaxUnreservePrintEngine()

               Unreserves the print engine and deletes the
               print spec.  Returns KER_OK on success.
               Displays the text of an error in case of
               failure, and returns the actual error code.




Other Functions
---------------

GetFilterType  WORD GetFilterType(LPSTR AFileName)

               Given a file (AFileName), return the toolkit
               image filter.


IsValidFilterType   BOOL IsValidFilterType(WORD AFilterType)

               Determines whether the filter type
               (AFilterType) is valid.  Return TRUE for a
               valid filter, FALSE if it is not.


InstantDisplayImage int  InstantDisplayImage(LPSTR
               AFileName, LPRECT lpSrcRect, HDC hDestDC,
               HWND hWnd, LPRECT lpDestRect, LPRECT
               lpClipRect, int xOffset, int yOffset,
               LPXYSCALE lpScale, DWORD dwOpt)

               Opens the Kofax engine and displays the image
               specified (AFileName) using the options
               specified (refer to KofaxDisplayOptions).
               The engine if closed after the image is
               displayed.



InstantGetImageAttr DWORD InstantGetImageAttr(LPSTR
               AFileName, WORD wAttrId)

               Opens the Kofax engine and gets the image
               attribute (wAttrId) for the file specified
               (AFileName).  The engine if closed after the
               image attribute is retrieved.


InstantPrintImage   int InstantPrintImage(LPSTR AFileName,
               DWORD dwOpt)

               Opens the Kofax engine and prints the image
               (AFileName) using the options specified
               (dwOpt).  The engine if closed after the
               image is printed.


InstantScanImage    int InstantScanImage(LPSTR AFileName,
               DWORD dwOpt)

               Opens the Kofax engine and scans the image
               (AFileName) using the options specified
               (dwOpt).  The engine if closed after the
               image is scanned.




OWL-based TControl-derived Windows Custom Control
-------------------------------------------------

     Registration function
     ---------------------

GetVersionKofaxDisplay   int GetVersionKofaxDisplay()

               Returns the current version of the
               TKofaxDisplay custom control.  The low order
               byte contains the major release number and
               the low order byte contains the minor release
               number.  It is a good practice to call this
               function during startup of your application
               so that the TKofaxDisplay control class is
               registered with Windows.


     Messages Supported
     ------------------


TKD_GETDISPLAYOPTIONS    WPARAM - set to NULL
                    LPARAM - set to NULL
                    RETURNS - a DWORD value set to the
                    display options of the current control
                    DESCRIPTIONS - gets the display options
                    setting (represented by a combination of
                    Kofax flags) of the current control.


TKD_GETIMAGEXYPOS   WPARAM - set to NULL
               LPARAM - set to NULL
               RETURNS - a DWORD value, where the LOWORD
               provides the X offset and the HIWORD provides
               the Y offset.  DESCRIPTIONS - gets the offset
               from the top left corner of the image where
               the image will be displayed in the control.
               Offsets are in terms of image pixels.


TKD_GETXYSCALE WPARAM - set to NULL
               LPARAM - set to a pointer to a XYSCALE
               structure (a XYSCALE structure is defined by
               Kofax)
               RETURNS - no value;  the XYSCALE structure
               passed as the LPARAM is filled with the
               current XYSCALE scale value of the control
               DESCRIPTIONS - gets the horizontal and
               vertival scaling factors for displaying the
               image in the control.


TKD_PROMPTDISPLAYOPTIONS WPARAM - set to NULL
                         LPARAM - set to NULL
                         RETURNS - no value
                         DESCRIPTION - prompts the user with
                         a dialog box that contains the
                         available Kofax display options.
                         Sets the control display options to
                         those selected by the user.


TKD_PROMPTXYSCALE   WPARAM - set to NULL
               LPARAM - set to NULL
               RETURNS - no value
               DESCRIPTION - prompts the user for the
               horizontal and vertical scaling factors to be
               used in the control when displaying images.
               Will reset display options as necessary to
               accommodate a users selection of a scaling
               factor.


TKD_SETDISPLAYOPTIONS    WPARAM - set to NULL
                    LPARAM - set to DWORD value representing
                    Kofax display options
                    RETURNS - no value
                    DESCRIPTION - sets the display option of
                    the control for displaying subsequent
                    images.


TKD_SETIMAGEFILE    WPARAM - set to NULL
               LPARAM - set to a LPSTR pointer to the image
               file name
               RETURNS - no value
               DESCRIPTION - sets the image file, and
               selects the correct image filter type based
               on the file extension.


TKD_SETIMAGEXYPOS   WPARAM - set to NULL
               LPARAM - DWORD value, where the LOWORD
               represents the X offset and HIWORD represents
               the Y offset from where the image should be
               displayed.  Offsets are in terms of image
               pixels.
               RETURNS - no value
               DESCRIPTION - sets the offset from the top
               left corner of the image where the image will
               be displayed in the control.  Offsets are in
               terms of image pixels.


TKD_SETXYSCALE WPARAM - set to NULL
               LPARAM - set to a pointer to a XYSCALE
               structure (a XYSCALE structure is defined by
               Kofax)
               RETURNS - no value
               DESCRIPTIONS - sets the horizontal and
               vertival scaling factors for displaying the
               image in the control.


     TKofaxDisplay OWL-based Control Class
     -------------------------------------

constructor    TKofaxDisplay(PTWindowsObject AParent, int
               AnId,  LPSTR ATitle, int X, int Y, int W, int
               H, PTModule AModule = NULL)

               Invokes TControl's constructor.  Initializes
               the control to display images in actual size.


constructor    TKofaxDisplay(PTWindowsObject AParent, int
               ResourceId, PTModule AModule = NULL)

               Constructs an object to be associated with an
               interface control of a TDialog.  The
               ResourceId must correspond to a control
               interface resource that you define.


GetClassName   LPSTR GetClassName(void)

               Returns "TKofaxDisplay".


GetDisplayOptions   DWORD     GetDisplayOptions()

               Returns the display options setting
               (represented by a combination of Kofax flags)
               of the current control.


GetImageXYPos  DWORD     GetImageXYPos()

               Returns the offset from the top left corner
               of the image where the image will be
               displayed in the control.  The LOWORD of the
               value returned represents the horizontal
               offset, and the HIWORD represents the
               vertical offset.  Offsets are in terms of
               image pixels.


GetXYScale     void GetXYScale(XYSCALE FAR * AScale)

               Sets AScale to the horizontal and vertival
               scaling factors for displaying the image in
               the control.


PromptDisplayOptions     void PromptDisplayOptions()

               Prompts the user with a dialog box that
               contains the available Kofax display options.
               Sets the control display options to those
               selected by the user.


PromptXYScale  void PromptXYScale()

               Prompts the user for the horizontal and
               vertical scaling factors to be used in the
               control when displaying images.  Will reset
               display options as necessary to accommodate a
               users selection of a scaling factor.


SetDisplayOptions   void SetDisplayOptions(DWORD
               ADisplayOptions)

               Sets the display option of the control for
               displaying subsequent images.


SetImageFile   void SetImageFile(LPSTR AImageFile)

               Sets the image file, and selects the correct
               image filter type based on the file
               extension.


SetImageXYPos  void SetImageXYPos(int AXPos, int AYPos)

               Sets the offset from the top left corner of
               the image where the image will be displayed
               in the control.  Offsets are in terms of
               image pixels.


SetXYScale     void      SetXYScale(XYSCALE FAR * AScale)

               Sets the control's horizontal and vertival
               scaling factors for displaying the image in
               the control to those in AScale.




Visual Basic Properties Reference
---------------------------------

Included in this toolkit is a VBKOFAX.VBX Visual Basic
custom control that enables complete image display and
manipulation functionality.  The properties supported are
strictly runtime.


     Properties
     ----------

FileName       TYPE - String
               DESCRIPTION - Sets image to a specific file.
               Can be reset an indefinite number of times.
               EXAMPLE - VBKofaxDisplay1.FileName

Fit            TYPE - Enumerated
               DESCRIPTION - Sets fit of image.  If image is
               displayed, will redisplay using new Fit
               option.  Fit can be Actual Size (0), Fill
               Window (1) and Fit In Window (2).
               EXAMPLE - VBKofaxDisplay1.Fit = 1

Rotate         TYPE - Enumerated
               DESCRIPTION - Sets rotation of the image.
               If image is displayed, will redisplay using
               new Rotate option.  Available options are:
               Rotate 0 (0), Rotate 90 (1), Rotate 180 (2),
               Rotate 270 (3).
               EXAMPLE - VBKofaxDisplay1.Rotate = 1

XScale         TYPE - Integer
               DESCRIPTION - Sets percentage horizontal
               scale.  If image is displayed, will redisplay
               using new scale option.  Scaling is set as a
               percentage of 100.
               EXAMPLE - VBKofaxDisplay1.XScale = 50

YScale         TYPE - Integer
               DESCRIPTION - Sets percentage vertical scale.
               If image is displayed, will redisplay using
               new scale option.  Scaling is set as a
               percentage of 100.
               EXAMPLE - VBKofaxDisplay1.YScale = 50

PromptDisplayOptions
               TYPE - True/False
               DESCRIPTION - When set to True, will display
               a dialog box that prompts the user for a set
               of possible display options.  Will retain the
               selected options for subsequent image
               display.  If image is displayed, will
               redisplay using new display options.
               EXAMPLE -
               VBKofaxDisplay1.PromptDisplayOptions = True

PromptScaling  TYPE - True/False
               DESCRIPTION - When set to True, will display
               a dialog box that prompts the user for the
               horizontal and vertical scaling options.
               Will retain the selected options for
               subsequent image display.  If image is
               displayed, will redisplay using new scaling
               selections.
               EXAMPLE - VBKofaxDisplay1.PromptScaling =
               True



Example Programs
----------------

The TKofax toolkit comes with two example programs.  One is
an OWL based program that demonstrates using the
TKofaxDisplay OWL-based control in a TWindow window, as well
as in a TDialog dialog box.  The second example program is a
Visual Basic makefile that demonstrates the VBKofaxDisplay
VBX control.  Both programs come with source code necessary
to rebuild them.


     OWL-Based Program
     -----------------

All the files that pertain to the OWL-based example start
with OWLEX.  If you followed the installation instructions,
they would be stored in \TKOFAXSW\OWL.  The program
OWLEXAMPL.EXE is a demonstration of using the TKofaxDisplay
custom control, within OWL, to display and manipulate images
in a TWindow (window) and a TDialog (dialog).  All source
file are included to rebuild the program.


     Visual Basic Example
     --------------------

All the files that pertain to the Visual Basic example start
with VBEXAMP.  If you followed the installation
instructions, they would be stored in \TKOFAXSW\VB.  The
program VBEXAMP.EXE is a demonstration of using the
VBKofaxDisplay Visual Basic custom control, which uses the
VBKOFAX.VBX file.  All source files are included to rebuild
the program.

          NOTE: YOU MUST HAVE CMDIALOG.VBX, VBRUN200.DLL and
          COMMDLG.DLL to use the example Visual Basic
          program VBEXAMP.EXE that is included in this
          package






