Please enable JavaScript to view this site.

A-Shell Reference

Command link buttons are a button type, introduced in Vista, which are typically rather large and contain three sub-components:

Main Text: a short text string comparable to the normal button text.
Secondary Text: a longer text string with additional explanation of what the button does. This string appears in a smaller font beneath the Main Text.
An icon: either the default green arrow pointing to the right, or a custom icon you specify. The icon appears at the left side of the button.

For example:

ashref_img102

See the Microsoft documentation for examples and usage guidelines.

Command Link buttons are distinguished from regular buttons in AUI_CONTROL purely by the syntax of the ctext parameter, which must be as follows:

ctext = maintext$ + "|" + secondarytext$ + "~" {+ iconspec$}

The iconspec$ can be a .bmp file, an .ico file (with the standard search path, which includes the %miame%\icons directory), or an iconname::dllname spec. It may also be omitted (to use the default icon), but the tilde must then be the last character in the ctext string. Do not specify the MBF_ICON or MBF_BITMAP flags. The icon or bitmap will be displayed at the larger of 16x16, 32x32 or 48x48, depending the height of the button.

If the Command Link button style is not supported by the version of Windows (i.e. prior to Vista), then the iconspec will be ignored, and the "|" will be converted to a chr(13) and the MBF_WRAP flag turned on, so as to display the secondarytext$ below the maintext$. (So the button will still appear at least functional, if not beautiful.)

See the sample program CMDLINK in EXLIB:[908,51] for an example.

History

2010 September, 5.1.1192:  added to A-Shell