This article is an overview of the organisation of the ENCX COM library. You will also need low level class documentation.
To use ENCX, you must first create an instance of the Library coclass. There should only be one Library object in your application. It should exist for longer that any other ENCX class.
The Library instance starts up the security system (dongle) for ENCX.
The security system can be either a software or hardware dongle. Either way the software license is tied to the computer in use. This is a requirement for ENC and ARCS chart use (except using demonstration data).
There is a rough division of the library into vector and raster chart display classes. Both halves follow a similar pattern - a manager class is responsible for maintaining a portfolio of information. A draw class is responsible for drawing the chart onto a Windows HDC. A GeoPix class converts between pixel and geographic positions.
In addition to these similarities both sides have their own families of value classes which reflect the fundemental differences between the formats.
The names of classes in the S57 half of the library start with S57 and the names of raster classes start with Ras.
The geopix class is the underlying class to convert from geographical positions on a particular chart to pixels. A typical use of this class is to help draw overlays on top of your charts. It is worth noting that S57 charts only ever have one GeoPix whereas ARCS charts (because of panels) can have several.
To convert geographical lines and polygon areas you should use the appropriate function in this class (Line or Area) rather than converting the vertices individually. This ensures that the pixel points returned are correctly clipped to panel extents.
To use ENCX with commerical charts you need to have a dongle. The Dongle class allows you to determine the state and device name of your dongle. The DongleObserver class is used to notify your code when the state of the dongle has changed. You can also use the Dongle class to encrypt and decrypt your own data.