ChangeApplicationIcon -- change docky icon (V6.0)
ChangeApplicationIcon(id1[, id2, type])
AmigaOS 4 only

This function can be used to change your application's icon in AmiDock at runtime. You have to pass at least one brush to this function. If you pass a second brush in the optional argument, then this brush will be used as the icon's second state. Both brushes must have the same dimensions. For the best visual appearance, you should only use brushes with alpha channel transparency with this function.

Please note that only standard dockies support two state icons in AmiDock. If your application is represented by an app docky in AmiDock, you may only specify one image here. See AmiDock information for more information on the difference between standard and app dockies.

Also note that changing the application icon of standard dockies causes a clearly visible relayout of AmiDock and thus is not apt to display animations in AmiDock. If you want to change the icon in a smooth way, you need to use an app docky. See AmiDock information for details.

Starting with Hollywood 9.0, you can also use Hollywood icons with ChangeApplicationIcon(). To do that, you have to pass #ICON in the optional type argument. In that case, id1 needs to be the identifier of an icon that should be used. If type has been set to #ICON, the id2 parameter will be ignored. In case of #ICON, the id2 parameter is unnecessary because in contrast to brushes, Hollywood icons can contain images for multiple states so ChangeApplicationIcon() can simply use the selected image stored in the icon.

The initial icon for your application in AmiDock can be specified using the @APPICON preprocessor command or the DockyBrush tag of the @OPTIONS preprocessor command.

Please note that this function can only be used if you have set the RegisterApplication tag in @OPTIONS to True. See OPTIONS for details.

brush or icon that should replace the current docky icon's normal state
optional: brush that should replace the current docky icon's selected state
optional: type of the object passed in id1 (must be either #BRUSH or #ICON, defaults to #BRUSH) (V9.0)

Show TOC