PulldownIconMenu Item

Icons may now be displayed in Menu Items. To display icons in PulldownMenuItems, a new Menu Item function, mdlDialog_textPDMItemSetIcon, may be called to set the icon information. Also, two new dialog item types, PulldownIconMenu and DItem_PulldownIconMenuItemRsc, have been added to support specifying the icon information within the item definition.

v8pulldowniconmenu.jpg

Item resource definition

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

typedef struct ditem_pulldowniconmenuitemrsc
{
#if defined (resource)
char label[];
ULong accelerator;
byte enabled;
byte mark;
long subMenuType;
long submenuId;
ULong helpInfo;
char helpTaskId[];
long pulldownItemHookId;
long searchId; // used to search for item
ULong commandNumber;
char commandTaskId[];
char unparsed[];
long iconId;
long iconType;
char iconTaskId[];
#else
long labelLength;
char label[1];
#endif
typedef struct ditem_pulldowniconmenursc
{
Ulong helpInfo;
#if defined (resource)
char helpTaskId[];
long pulldownHookId;
ULong attributes;
char menuTitle[];
#else
long helpTaskIdLength;
char helpTaskId[1];
#endif
#if defined (resource)
#define PulldownIconMenu RTYPE_PulldownIconMenu
#define PDIconMenu RTYPE_PulldownIconMenu
#endif

PulldownIconMenu functions

mdlDialog_textPDMItemSetIcon

mdlDialog_textPDMItemGetIcon

mdlDialog_textPDMItemSetPressedIcon


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