VARKON Version 1.15 1997-10-24

> ## cre_icon - Function

> Create icon
> Description
> Creates an icon in a dialogue window. Icons without frames ( frame = 0 ) are regarded as simple bitmaps. An icon with frame generates an event that will be catched if waited for by the wait_win() routine when you click on it.
> Syntax
> cre_icon(window, pos, frame, name, bcolor, icolor)

> INT | window;
> VECTOR | pos;
> FLOAT | frame;
> STRING | name;
> INT | bcolor;
> INT | icolor;

> Principal parameters

> window | - Dialogue window identity
> pos | - Upper left coordinates relative to the dialogue window
> frame | - Frame width in pixels
> name | - Name of bitmap file. A path may be included

> Optional parameters

> bcolor | - Background colour (UNIX only, not used on Microsoft Windows)
> icolor | - Icon colour (UNIX only, not used on Microsoft Windows)

> Return value
> An INT holding the id of the icon created.
> Comments
> Frame width can be zero or one but the UNIX version of VARKON also honours values greater than one to create thicker frames if needed.
> The UNIX version of VARKON currently only supports monochrome bitmap files. Such files can be created with the common UNIX "bitmap" program or various versions of "paint". Note that even if the bitmap is monochrome you can select other colours than black and white for background and foreground.
> The Microsoft Windows implementation of VARKON supports *.BMP colour bitmaps and therefore doesn't need or use parameters bcolor and icolor.

VARKON Homepage | Index