Image Control

Updated June 2010

A-Shell supports the following five internal methods for displaying images:

•   AUI_IMAGE (e.g. xcall AUI, AUI_IMAGE, or xcall IMAGE) . This method doesn't actually create a "control"; it just displays the image at the specified row/col coordinates, and may be used in both traditional text screens as well as fully GUI windows and dialogs. The main disadvantage of this method is that the images don't act like controls, so they don't integrate as well into GUI screens.

•   Icon Controls, which come in both static and button flavors too, and are essentially just a particular variation of an image type. The term "icon" has both a technical meaning (referring to the ICO file format, which contains multiple versions of the image in different sizes and bit depths) and a more common meaning (referring to a small image of a somewhat standardized size which either acts as a kind of logo to identify a program or represents some kind of action that will occur when you click on it). It is important to note that other types of image formats (besides ICO, e.g. BMP) can serve as icons in the latter sense. In fact, so called "icon libraries" often contain both ICO and other file formats.

•   Images can be displayed inside of XTREE cells.

•   Static controls (MBF_STATIC + MBF_BITMAP), where the ctext parameter specifies the image file, which may be in JPG, BMP, PCX, TIF or PNG format.

•   Button controls (MBF_BUTTON + MBF_BITMAP), where the ctext parameter specifies the image file, same formats as above. Button controls displaying an image are very similar to static controls displaying an image - both support the same range of image types and both can have click events associated with them. The differences are mainly in the way the border of the control looks, and in the way scaling and alignment work.

Static and Button controls can also specify bitmap resources contained inside DLLs using the syntax:

resname::dllname  

The first three of the above five categories are already covered elsewhere in this document; so we will focus here on the last two, which we will refer to as the Static Image Control and the Button Image Control.

History

2010 June, 5.1.1183:  Static and Button controls can now also specify bitmap resources contained inside DLLs.