ToggleIcon item

A ToggleIcon item has an on/off value like the ToggleButton but displays similar to an IconCmd. The item resource for the ToggleIcon is similar to the ToggleButton resource, with added Icon information. Also, ToggleButtons may be converted to display as ToggleIcons by calling the new function, mdlDialog_toggleButtonSetIcon.

v8toggleicons.jpg

Item resource definition

The ToggleIcon item is defined in a resource file with the following structure:

typedef struct ditem_toggleiconrsc
{
ULong commandNumber;
ULong commandSource;
long synonymsId;
ULong helpInfo;
ULong helpSource;
long itemHookId;
long itemHookArg;
ULong mask;
char invertFlag;
ULong attributes;
long iconId;
ULong iconType;
#if defined (resource)
char label[];
char accessStr[];
#else
long labelLength;
char label[1];
#endif
#if defined (resource)
resourceclass DItem_ToggleIconRsc RTYPE_ToggleIcon extendedAttributes,
extendedIntAttributes;
#define ToggleIcon RTYPE_ToggleIcon
#endif

ToggleIcon functions

The ToggleButton functions are applicable to ToggleIcon dialog items. In addition, the following new functions have been added for both dialog item types:

mdlDialog_toggleButtonSetIcon

mdlDialog_toggleButtonSetPressedIcon


Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.