[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'icon' (#aros)


Set and get icon and icon.library options


Source position: icon.pas line 236

function IconControlA(

  Icon: PDiskObject;

  const Tags: PTagItem





Pointer to a struct DiskObject, or NULL if global options are to be modified/queried.



Options to modify/query.

Function result

Number of tags that were processed correctly, i.e. the number of tags whose parameters are in order, for which information could be returned, etc. If processing stops because of an error, the number returned by this function will be smaller than the number of tag items passed in. The same happens if the information you wanted to obtain is unavailable. In any case, check the error code this routine can set up for you.

Changing an icon's palette or image data does not automatically produce a different icon image you can use. To do this, you must re-layout it using LayoutIconA().

When querying parameters, make sure to always pass in a pointer to a LongWord variable to store the result in.

Some get/set operations may cause additional memory to be allocated. This may fail; be prepared.

IconControlA() processes the tag item list in sequential order. This has consequences for several tags, such as the palette size and the transparent colour. For example, if you want to make colour #14 of an icon image transparent, make sure to have the palette size set to at least 15 colours before you try to change the transparent colour. Otherwise, IconControlA() may refuse to set the transparent colour to #14 since it won't know that there should be more than 14 colours in that image at the time you try to set it. Therefore, if you wanted to change the palette size and the transparent colour in the same tag item list, make sure that the palette size change tag appears before the transparent colour change tag.

As described above, some of the operations on icons are not supported for DiskObjects not allocated through icon.library. In such cases you will receive an error code ERROR_ACTION_NOT_KNOWN.


This function is used to modify and query icon and icon.library options.

See also



Return extra information from the system



Duplicate an icon



Retrieve an icon



Adapt a palette-mapped icon for display



Create an empty icon



Blit from source bitmap to destination rastport with masking of source image.



Search for the closest color match, or allocate a new one.



Invoke a Hook function callback.

Documentation generated on: 2017-01-10