Chapter 2:
Installation and Configuration











The Presentation Graphics SDK is a professional business charting library for Macintosh, Power Macintosh, Windows, Windows NT, Windows 95, OS/2 and UNIX. It can be purchased for use on the following specific platforms:


AIX SDK; The SDK for IBM AIX Servers.


HP-UX SDK; The SDK for HP-UX Servers.


Linux SDK; The SDK for Linux Pentium Servers.


Macintosh SDK. The Presentation Graphics SDK that runs on a Macintosh or Power Macintosh. The Mac libraries are compatible with Apple's MPW, Symantec C++, and Metrowerks CodeWarrior.


OS/2 SDK; The SDK for OS/2.


Solaris SDK; The SDK for Solaris Servers.


Windows 3.1 SDK; The SDK for 16-Bit Windows 3.1. The library is a DLL which can be easily integrated into your applications.


Windows 95/98 & NT; The SDK for 32-Bit Windows...Windows NT, Windows 95 or Windows 98. The Presentation Graphics SDK is compatible with 32-Bit Microsoft Visual C++ 6.0, and is easy to integrate into an MFC shell.


Regardless of the target platform, the Presentation Graphics SDK is provided as an executable (.EXE) installation wizard (e.g., PGSDKSetup.EXE).


Before you run the installation wizard, PLEASE BE SURE that you have installed Visual C++ 6.0 on your system. The include and library paths will not be installed correctly in Visual C++ 6.0 is not installed.


To install the Presentation Graphics SDK, execute the PGSDKSetup.EXE program. Follow the instructions provided by the setup program to install the SDK on your system. The successful completion of setup, installs all of the files that you need to use Presentation Graphics SDK at the specified locations:


...\PGSDK\Documentation; The information in PG_TECH.DOC will help you understand what the library can do and how the library is invoked. The \Doc directory in this directory contains the complete programmers manual (this manual), the PGSDK Attributes Guide, and the PGSDK API Guide in HTML format.


...\PGSDK\Include; Main include file for the SDK (PG32.H). This directory also contains the AmigoDialogAPI.h that you will need if you want to use the Amigo dialogs.


...\PGSDK\LIB; Main .LIB file for the SDK (PGSDK32.LIB).


...\PGSDK\Re-Distribute; Main .DLL file for the SDK (PGSDK32.DLL). This directory also contains the PGDLG32.DLL, PGRES32.DLL and AMZI4.DLL that you will need to ship with your product if you use Amigo dialogs.


...\PGSDK\Debug DLLs; Debug version of SDK DLL's for use in finding and reporting problems.


...\PGSDK\Samples; Provides a number of different example programs that demonstrate the various features in the Presentation Graphics SDK. See Quick Tour for details.



When the installation is complete, the SAMPLES directory will contain the following example programs:


..\PGSDK\Samples\Annotations: Demonstrates how to add annotations to a chart (Arrows, freehand text, etc...).


..\PGSDK\Samples\Editing: This directory contains a general purpose sample. Drag out a chart to begin. You can size and resize the chart, move and resize chart elements, turn on/off depth mode, detect/select chart elements, and lots more.


...\PGSDK\Samples\FX: Special Effects. Demonstrates how to apply washes, bitmaps or metafile art to any chart element. Turn on/off Pictogram mode.


..\PGSDK\Samples\MarkerShapesMeta: Hooking up a basic chart in an MFC environment.


..\PGSDK\Samples\MFC_SAMP: Another MFC sample that also shows how to use the AMIGO Dialogs for editing chart properties.


..\PGSDK\Samples\SendData: Example of how to use the SEND_DATA method for attaching data to a chart (Data is encapsulated in the chart object).


..\PGSDK\Samples\Dialogs: Demonstrates how to hook up the powerful tabbed dialogs that control grids, grapytypes and many other attributes. Also shows how to use "PlaceDefaultElements".


Building Sample Programs: All of the sample programs can be built by loading SAMPLES.DSW into MSVC 6.0 or higher. Simply select Rebuild All from the Build Menu to build all sample EXE's. They will be stored in the Bin folder.



The library includes a header file, PG32.H, contains all of the function prototypes, data structures, and constants. You must include the PG32.H file in all of your .C files that access a charting engine function:


/* Presentation Graphics SDK header file */
#include "pg32.h"


The compile command line must define WINDOWS and _WINDOWS. A sample compile command for Microsoft C 6 is shown below.


cl -AM -c -d -Gsw -Od -W2 -Zpi -DWINDOWS -D_WINDOWS samp1.c


Setup for Compilers other than Visual C++ 6.0:



Add the \INCLUDE directory to your MSVC include path.



Add the \LIB directory to your MSVC lib path.



The Presentation Graphics SDK library must be linked into your application. A sample link command for Microsoft C 6 is shown below:


link samp1,/align:16,/map, pg mlibcew libw/NOD/NOE/CO, samp1.def