User Interface Extension Library for CorelSCRIPT

Note. A new version of the UI Extension Library is now available here.

CorelSCRIPT's user interface is quite limited. You can't use any custom dialog box controls, only those supported by CorelSCRIPT. I have created a Dynamic-Link Library (DLL) which allows to perform direct painting in Windows Bitmap files. These bitmaps could then be displayed in IMAGE control of a dialog which allows to create live previews of the effects before applying them to CorelDRAW or Photo-Paint document. I must say the execution speed is quite high so you can create previews "on-the-fly" as the user is typing effect parameters in the dialog controls.

This library is a great tool to add attractiveness and professional look to your hi-tech scripts and help users estimate the effect before applying it, so saving time and efforts.

The library consists of one DLL file - SCPRTL10.DLL, that exports a number of procedures and functions which can be used in the script. The functions can be divided in three main groups:

  1. Font-oriented functions. These functions can access fonts installed on the system. You can get the list of font names and also distinguish them by type (TrueType, Type 1, Raster).
  2. Color preview. There are three functions that create small bitmaps (1x1, 1x2 and 2x2 pixels) which show the specified RGB color(s). Displaying these bitmaps in IMAGE control which stretches the bitmap to fit the control bounding rectangle will produce the appearance of uniformly filled rectangles with color wells.
  3. Paining. This is the largest procedure group. It contains 15 functions to create an empty bitmap (canvas) and draw lines, rectangles, ellipses, text strings etc.

Here is an example of dialog created using The UI Extension Library:

plotsh.gif (7624 bytes)
(for more information, see Oberon Function Visualizer)

[ <Previous page | Next Page> ]

[ Learning CorelSCRIPT | Oberon Home Page ]

Copyright 2000 by Alex Vakulenko. All rights reserved.
This page was last revised on 01/13/00.