Opening documents in external windows

 

As with most Windows applications, document windows in Imagenation are normally contained within the Imagenation window.

Sometimes you may want to render documents in windows that belong to your client application instead, while hiding Imagenation completely. External windows allow you to do this. External windows are viewed in your application's display space but are still controlled by Imagenation.

To open a document in an external window:

1. Hide Imagenation. For details, click Hiding Imagenation.

2. Create your own window, and pass its handle to RegisterExternalWindow to get a docwinID that corresponds to that handle.

3. Call OpenExtDocwin to open the document into your window.

4. Call HandleExternalWindow to tell Imagenation to take control of the display in the document window.

5. In the MessageProc for your window class, on a WM_SIZE message, call ResetExternalWindowSize to tell Imagenation to resize its external window based on your window size.

To close an external window:

· Call UnregisterExternalWindow to free up Imagenation resources attached to that window.

Note While you can display color rasters in external document windows, the color palette used may not accurately reflect the data in the file.

See also