Please enable JavaScript to view this site.

The STATIC version of the icon control gives you a non-scaled icon with no border, which is appropriate for displaying as a sort of logo in a dialog. This example shows a dialog with several icons, just for illustration purposes:

ashref_img113

Static icons are created by setting ctype to MBF_STATIC + MBF_ICON, and ctext to the resource name of the icon. There are four possible sources of icon resources, each with its own syntax:

System icon resources. These are embedded in Windows, and are referenced with a name starting with "#". As of build 919, the only ones available are shown in the example above and listed in the following table (the names are not case sensitive):

ICONAMES

Description

#HAND

Same as the MBICON'stop icon in MSGBOX. This normally appears as an X in a red circle.

#QUESTION

Same as the MBICON'question icon in MSGBOX.

#EXCLAMATION

Same as the MBICON'exclamation in MSGBOX. This normally appears as a yellow triangle with an exclamation mark in it.

#INFO

Same as the MBICON'info icon in MSGBOX. This normally appears as an "i" in a white caption bubble.

#WINPTR

A generic printer icon.

 

For example:

xcall AUI, AUI_CONTROL, CTLOP_INFO, ctlid, "#question", MBST_ENABLE, MBF_STATIC + MBF_ICON, "", "", cstatus, srow, scol, erow, ecol2

A-Shell internal icon resources. These are icons embedded in the ashw32.exe executable, and consist of icons used internally by A-Shell, plus any third-party application icons that have been sent to us for embedding in ashw32.exe. The syntax for these is just a string name, without the "#", such as "ACORNICON", or #dddd where dddd is the decimal icon numbe (1000+). (If we embedded an icon specially for you, we will tell you the name and/or number.)
Icons loaded from external DLLs. In this case the syntax for ctext is "resourcename::modulename" where resourcename is a string name, such as "stop", and modulename is the name of the DLL (or other loadable module). For DLL’s, you do not need to specify the DLL extension, but the DLL file must be located in the same directory as the copy of ashw32.exe that is being launched, or else in the WINDOWS or SYSTEM32 directory. (As of A-Shell 5.1.1185 of June 2010, under ATE, such modules can also be located in the ATEPERMCACHE directory.) For example, an icon source named "document_check" in the ashico1.dll library would be referenced as "document_check::ashico1".
ICO files. In this case the syntax for ctext is simply the filespec of the .ICO file (either in AMOS or native Windows format).

Static icons are generally not scaled to the size of the control; see next paragraph for exception. Instead, they are fixed by Windows, according to characteristics of the desktop environment. In almost all cases, this means they are 32 x 32 pixels. The two consequences of this are that the erow and ecol parameters do not matter (by convention they should probably be set to match the srow and scol parameters), and that you need to allow for adequate space for the icons in cases where the number of pixels in the window is smaller than what you designed with. For example, if the window size is about 800 x 500, a 32 x 32 icon will occupy about 1.5 rows in height and 3.2 columns in width. But the same icon in a window of 1200 x 1000 will occupy less than one row in height and about two columns in width.

The exception to the above rule is that you can force the icon to display at a particular size by setting erow and ecol to the desired height and width in pixels, and specifying the MBF2_PIXSIZE flag in the ctype2 parameter. Note that for best results, you should use standard sizes, such as 64x64, 128x128, or 256x256, since icons are typically optimized for these sizes.

Static icons in dialogs interpret a starting row of 0 as a special flag to position it with about ½ row of top margin below the title bar of the dialog. This is just about right for the typical case. (Row one puts the icon right up against the title bar, and row two would waste too much space.) The sample dialog showing the five built-in icons above illustrates this. The first four icons are positioned with srow = 0, while the last one uses srow = 1.

Icon Library

Reviewed July 2020

MicroSabio provides an icon library in ashico1.dll, which contains the icons shown and listed below. These have been purchased by MicroSabio so they can be used, royalty-free, by A-Shell developers. While these icons are free to use, most icons are copyrighted and/or licensed and should not be used without the explicit permission of their owner. Icon collections, such as MicroSabio's, are available for purchase from many icon vendors and developers.

The library may be displayed with the sample program ICODLG in EXLIB:[908,27], which makes use of the subroutine BTNMENU.SBX in SOSLIB:[907,24]. A text listing of the available icons is given after the images.

ashref_img114

ashref_img115

ashref_img116

ashref_img117

 

Here is a listing of the icons' names, grouped by category where appropriate.

miscellaneous

about, add, add2, copy, cut, delete, delete2, door, door2, edit, error, exchange, exit, export1t, first_aid, fit_to_size, font, forbidden, garbage, help, help2, history, import1, information, music, paste, printer3, preferences, question and answer, redo, refresh, replace, replace2, signpost, star_blue, stop, transform, transform2, undo, unknown, view, warning

arrow

down_blue,  left_blue, right_blue, down_green, left_green, right_green, up_blue, up_green,

bookmark

add, delete, down, new, up

check

check, check2, checks

disk_blue

disk_blue, error, ok, warn

document

add , certified, chart, check, cup, edit, error, exchange, find, heart, info, lock, ok, out, preferences, text, view, documents

find

find, again, next, previous, text

folder

folder, folder_add

gear

gear, error, ok, pause, refresh, stop, time, gears

lightbulb

off, on,

media

beginning, end, fast_foward, pause, play, play_green, rewind, step_back, step_forward, stop, stop_red

navigate

beginning, up, up2, left, left2, end, down, down2, right, right2

notebook

notebook, notebook_preferences

photo

portrait, scenery

text

text, bold, find, italics, normal, speaker, tree, underline

window

colors, environment, gear, preferences

zoom

in, out

 

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software