Please enable JavaScript to view this site.

A-Shell Development History

AUI_CONTROL enhancement: Support the new "Command Link" button style (introduced in Vista). Command Link buttons 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.

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, a .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 on how tall the button is.

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.BP in [908,51] of the EXLIB for an example.