8Sample Applications

Each of the sample applications included in this SDK is designed to highlight a specific aspect of the technology's functionality. We ship built versions of these sample applications. The compiled executables should be in the root directory where the product is installed.

The following copyright applies to all sample applications shipped with this product:

You have a royalty-free right to use, modify, reproduce and distribute the Sample Applications (and/or any modified version) in any way you find useful, provided that you agree that Oracle has no warranty obligations or liability for any Sample Application files.

8.1 Building the Samples on a Windows System

Microsoft Visual Studio project files are provided for building each of the sample applications. For 32-bit versions of Windows, versions of the project files are provided for Visual Studio 6 (.dsp files) and Visual Studio 2005 (.vcproj files).

Note:

Because .vcproj files may not pick up the right compiler on their own, you need to make sure that you are building with the Win64 configuration in Visual Studio 2005. For 64-bit versions of Windows, only the Visual Studio 2005 versions are available.

The project files for the sample applications can be found in the \sdk\samplecode\win subdirectory of the Oracle Outside In SDK.

8.2 Building the Samples on a UNIX System

See the following sections for specific information about building the sample applications on your flavor of UNIX:

8.3 An Overview of the Sample Applications

This section provides an overview of the sample applications provided with this product. Please note that not all of the sample applications are provided for both the Windows and UNIX platforms. See the heading of each application's subsection for clarification.

8.3.2annotate

This sample is essentially the same as SIMPLE except that it uses the Oracle Outside In's Raw Text and Annotation ability to annotate all occurrences of the text the in the document. This sample demonstrates the following messages:

SCCVW_ADDANNOTATION

SCCVW_ANNOTATIONEVENT

SCCVW_GOTOANNOTATION

SCCVW_CLOSEFILE

SCCVW_COPYTOCLIP

SCCVW_FILECHANGE

SCCVW_GETFILEINFO

SCCVW_PRINT

SCCVW_VIEWFILE

It also demonstrates the SCCID_SYSTEMFLAGS option. Please note that the compiled Linux version of annotate is compiled on Red Hat Linux and as such may not work perfectly on the SuSE Linux platform without including SuSE's LessTif libraries or recompiling.

Messages used include:

SCCVW_ADDANNOTATION

SCCVW_CLEARANNOTATIONS

SCCVW_COMPPOSITIONS

SCCVW_DISPLAYPOSITION

SCCVW_FINDANNOTATION

SCCVW_FINDPOSITION

SCCVW_GETFILEINFO

SCCVW_GETRAWTEXT

SCCVW_GOTOANNOTATION

SCCVW_MAPPOSITION

SCCVW_SETSELECTION

SCCVW_VIEWFILE

8.3.3apitest (UNIX Only)

This sample provides a comprehensive test of the API functionality. Messages used include:

SCCVW_ADDANNOTATION

SCCVW_CLEARANNOTATIONS

SCCVW_CLOSEFILE

SCCVW_COMPPOSITIONS

SCCVW_COPYTOCLIP

SCCVW_DISPLAYPOSITION

SCCVW_FINDANNOTATION

SCCVW_FINDPOSITION

SCCVW_GETFILEINFO

SCCVW_GETOPTION

SCCVW_GETRAWTEXT

SCCVW_GETTREECOUNT

SCCVW_GETTREENODE

SCCVW_IDLE

SCCVW_MAPPOSITION

SCCVW_SAVETREENODE

SCCVW_SEARCH

SCCVW_SEARCHNEXT

SCCVW_SELECTALL

SCCVW_SETOPTION

SCCVW_SETSELECTION

SCCVW_VIEWFILE

SCCVW_VIEWTHISFILE

The application also demonstrates the following options:

SCCID_ARCOUTPUTPATH

SCCID_ARCRENAME

SCCID_DAYNAMES

SCCID_DIALOGFLAGS

SCCID_DISPLAYFONTALIAS

SCCIDOPT_FIFLAGS

SCCID_FONTSCALINGFACTOR

SCCID_INTLFLAGS

SCCID_MONTHNAMES

SCCOPTID_NUMBERFORMAT

SCCIDOPT_PRINTFONTALIAS

SCCID_SYSTEMFLAGS

SCCIDOPT_TEMPDIR

SCCIDOPT_UNMAPPABLECHAR

SCCID_VECPRINTBACKGROUND

SCCID_VECSHOWBACKGROUND

8.3.4drawpage

This application demonstrates the DrawPage feature that can be used to display thumbnails and write pages to bitmaps. Messages used include:

SCCVW_CLOSEFILE

SCCVW_COPYTOCLIP

SCCVW_DEINITDRAWPAGE

SCCVW_DRAWPAGE

SCCVW_FILECHANGE

SCCVW_GETDISPLAYINFO

SCCVW_GETDRAWPAGEINFO

SCCVW_GETFILEINFO

SCCVW_INITDRAWPAGE

SCCVW_OPTIONCHANGE

SCCVW_VIEWFILE

It also demonstrates the SCCID_VECPRINTBACKGROUND option.

8.3.5mdiview (Windows Only)

This application shows how multiple view windows can be supported in an multiple document interface setting. Messages used include:

8.3.6mfcview (Windows Only)

8.3.7options (Windows Only)

This sample app demonstrates a broad set of messages, including the following:

SCCVW_DODIALOG

SCCVW_DOHELP

SCCVW_GETOPTION

SCCVW_HSCROLL

SCCVW_READAHEADDONE

SCCVW_SETOPTION

SCCVW_VSCROLL

Additionally, the application demonstrates the following options:

SCCID_ARCOUTPUTPATH

SCCIDOPT_DEFAULTPRINTMARGINS

SCCID_DISPLAYFONTALIAS

SCCIDOPT_FIFLAGS

SCCIDOPT_FILTERJPG

SCCIDOPT_FILTERLZW

SCCID_FONTSCALINGFACTOR

SCCIDOPT_PRINTFONTALIAS

SCCID_REORDERMETHOD

SCCID_RESOURCELIBRARYID

SCCID_SCROLLFLAGS

SCCID_SYSTEMFLAGS

SCCIDOPT_TEMPDIR

SCCIDOPT_UNMAPPABLECHAR

SCCID_WPDISPLAYMODE

8.3.8print (Windows Only)

This application shows various print options. Messages used include:

SCCVW_GETFILEINFO

SCCVW_PRINT

SCCVW_PRINTEX

SCCVW_PRINTSETUP

This application also demonstrates the following options:

SCCIDOPT_WHATTOPRINT

SCCIDOPT_PRINTSTARTPAGE

SCCIDOPT_PRINTENDPAGE

SCCID_PRINTCOLLATE

SCCID_PRINTCOPIES

8.3.9printd (UNIX Only)

This application code demonstrates how to implement printing in the Oracle Outside In Viewer using a dialog. This uses the API messages:

SCCVW_GETFILEINFO

SCCVW_GETOPTION

SCCVW_PRINT

SCCVW_PRINTSETUP

SCCVW_SETOPTION

SCCVW_VIEWFILE

It also demonstrates the following options:

SCCID_BMPPRINTBORDER

SCCID_BMPPRINTASPECT

SCCID_VECPRINTBORDER

SCCID_VECPRINTASPECT

SCCIDOPT_SSPRINTGRIDLINES

SCCIDOPT_SSPRINTHEADINGS

SCCIDOPT_SSPRINTFITTOPAGE

SCCIDOPT_SSPRINTDIRECTION

SCCIDOPT_SSPRINTSCALEPERCENT

SCCIDOPT_SSPRINTSCALEXHIGH

SCCIDOPT_SSPRINTSCALEXWIDE

SCCIDOPT_DBPRINTGRIDLINES

SCCIDOPT_DBPRINTHEADINGS

SCCIDOPT_DBPRINTFITTOPAGE

SCCID_PRINTHEADER

SCCIDOPT_USEDOCPAGESETTINGS

SCCIDOPT_DEFAULTPRINTFONT

SCCID_PRINTHEADERFONT

SCCIDOPT_DEFAULTPRINTMARGINS

8.3.10prints (UNIX Only)

This application code demonstrates how to implement printing in the Oracle Outside In Viewer. This uses the API messages:

SCCVW_GETFILEINFO

SCCVW_GETOPTION

SCCVW_PRINT

SCCVW_PRINTSETUP

SCCVW_SETOPTION

SCCVW_VIEWFILE

It also demonstrates the following options:

SCCID_BMPPRINTBORDER

SCCID_BMPPRINTASPECT

SCCID_VECPRINTBORDER

SCCID_VECPRINTASPECT

SCCIDOPT_SSPRINTGRIDLINES

SCCIDOPT_SSPRINTHEADINGS

SCCIDOPT_SSPRINTFITTOPAGE

SCCIDOPT_SSPRINTDIRECTION

SCCIDOPT_SSPRINTSCALEPERCENT

SCCIDOPT_SSPRINTSCALEXHIGH

SCCIDOPT_SSPRINTSCALEXWIDE

SCCIDOPT_DBPRINTGRIDLINES

SCCIDOPT_DBPRINTHEADINGS

SCCIDOPT_DBPRINTFITTOPAGE

SCCID_PRINTHEADER

SCCIDOPT_USEDOCPAGESETTINGS

SCCIDOPT_DEFAULTPRINTFONT

SCCID_PRINTHEADERFONT

SCCIDOPT_DEFAULTPRINTMARGINS

8.3.11redirect

This sample is essentially the same as SIMPLE except that it redirects the Oracle Outside In input routines (Read, Seek, Tell, …) through its own routines. This sample uses the API messages SCCVW_VIEWFILE and SCCVW_GETFILEINFO.

8.3.12search

This sample is essentially the same as SIMPLE except that it adds the ability to search for strings in the file being viewed. Messages used include:

SCCVW_GETFILEINFO

SCCVW_SEARCH

SCCVW_SEARCHNEXT

SCCVW_VIEWFILE

8.3.13simple

This sample demonstrates the simplest implementation of the Viewer. It shows the basics of how to create a view window, view a file, print the viewed file and copy to the clipboard. Messages used include:

SCCVW_CLOSEFILE

SCCVW_COPYTOCLIP

SCCVW_FILECHANGE

SCCVW_GETFILEINFO

SCCVW_PRINT

SCCVW_VIEWFILE

8.3.14welcome (Windows Only)

This application displays the welcome.doc file. Messages used include: