7 Sample Applications
This chapter includes the following sections:
7.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 2013 (.vcxproj files).
Note:
Because .vcxproj 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 2013. For 64-bit versions of Windows, only the Visual Studio 2013 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.
7.2 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 the Windows platform. See the heading of each application's subsection for clarification.
This section includes the following sample applications:
7.2.1 annoex
This sample demonstrates the view window's advanced annotation and positioning capabilities. Messages used include:
-
SCCVW_ADDANNOTATION
-
SCCVW_ANNOTATIONEVENT
-
SCCVW_BAILOUT
-
SCCVW_CLEARANNOTATIONS
-
SCCVW_COMPPOSITIONS
-
SCCVW_COPYTOCLIP
-
SCCVW_DISPLAYPOSITION
-
SCCVW_FINDANNOTATION
-
SCCVW_FINDPOSITION
-
SCCVW_GETANNOTATIONDATA
-
SCCVW_GETFILEINFO
-
SCCVW_GETRAWTEXT
-
SCCVW_HILITESTYLE
-
SCCVW_MAPPOSITION
-
SCCVW_SETSELECTION
It also demonstrates the following options:
-
SCCID_SYSTEMFLAGS
-
SCCID_FALLBACKFORMAT
7.2.2 annotate
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
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
7.2.3 drawpage
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.
7.2.4 ExtractArchive
ExtractArchive demonstrates using the DATree API to extract all nodes in an archive.
The application is executed from the command line and takes two parameters, the name of the input file and the name of an output directory for the extracted files:
ExtractArchive input_file output_directory
7.2.5 mdiview
This application shows how multiple view windows can be supported in an multiple document interface setting. Messages used include:
-
SCCVW_FINDPOSITION
-
SCCVW_GETIDEALWINDOWSIZE
-
SCCVW_GETTREENODE
-
SCCVW_MAPTREEPOSITION
-
SCCVW_SEARCHDIALOG
-
SCCVW_SEARCHNEXT
-
SCCVW_SELCHANGE
-
SCCVW_SELECTALL
-
SCCVW_SETOPTION
-
SCCVW_VIEWAS
-
SCCVW_VIEWTHISFILE
This sample also demonstrates the following options:
-
SCCID_ARCSAVEEVENT
-
SCCID_DIALOGFLAGS
7.2.6 mfcview
This application shows a simple viewer implementation using Microsoft Foundation Class. Messages used include:
-
SCCVW_GETCLIPINFO
7.2.7 options
This sample app demonstrates a broad set of messages, including the following:
-
SCCVW_DODIALOG
-
SCCVW_DOHELP
-
SCCVW_GETCURRENTPAGENUMBER
-
SCCVW_GETOPTION
-
SCCVW_HSCROLL
-
SCCVW_INFOMESSAGE
-
SCCVW_READAHEADDONE
-
SCCVW_SETOPTION
-
SCCVW_VSCROLL
-
SCCVW_VIEWTHISFILE
Additionally, the application demonstrates the following options:
-
SCCID_ARCOUTPUTPATH
-
SCCID_BMPZOOM
-
SCCID_DEFAULTPRINTMARGINS
-
SCCID_DISPLAYFONTALIAS
-
SCCID_FIFLAGS
-
SCCID_FILTERJPG
-
SCCID_FILTERLZW
-
SCCID_FONTSCALINGFACTOR
-
SCCID_HTML_COND_COMMENT_MODE
-
SCCID_MAILHEADERHIDDEN
-
SCCID_MAILHEADERVISIBLE
-
SCCID_MAINTAINZOOM
-
SCCID_PRINTFONTALIAS
-
SCCID_REORDERMETHOD
-
SCCID_RESOURCELIBRARYID
-
SCCID_SCROLLFLAGS
-
SCCID_SYSTEMFLAGS
-
SCCID_TEMPDIR
-
SCCID_UNMAPPABLECHAR
-
SCCID_VECZOOM
-
SCCID_WPDISPLAYMODE
7.2.8 print
This application shows various print options. Messages used include:
-
SCCVW_GETFILEINFO
-
SCCVW_PRINT
-
SCCVW_PRINTEX
-
SCCVW_PRINTSETUP
This application also demonstrates the following options:
-
SCCID_WHATTOPRINT
-
SCCID_PRINTSTARTPAGE
-
SCCID_PRINTENDPAGE
-
SCCID_PRINTCOLLATE
-
SCCID_PRINTCOPIES
7.2.9 redirect
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.
7.2.10 search
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
7.2.11 simple
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