MKI_ICON_DATA (Basic Classes) Changed in Version 2017.1

www.CAD6.com

C++ Syntax

class MKI_ICON_DATA

{

  public:

 

  MKI_BITMAP_PTR m_pIconBitmap;

  __int32 m_nIconXOffset,

          m_nIconYOffset,

          m_nIconXSize,

          m_nIconYSize,

          m_nIconMode;

};

 

This structure contains the description of a single icon.

 

Element Description

IconBitmap Changed in Version 2015.2

[MKI_BITMAP_PTR] This bitmap handle identifies the bitmap that contains the icon.

When used as a plug-in's command or menu icon, the bitmap must be defined with 32-bit RGBA colors. Use MKI_BitmapLoadImage() to load PNG files with alpha channel as icon bitmaps. This bitmap handle must then be valid throughout the plug-in's lifetime, i.e. it should have been be created inside the MKI_PlugInInit procedure and should not be deleted until inside the MKI_PlugInExit procedure!

IconXOffset

IconYOffset

[__int32] These two values determine the offset of the command's or menu's icon inside the bitmap in pixels, starting from the upper left corner with positive value going right and down.

IconXSize New in Version 2015.2

IconYSize

[__int32] These two values determine the width and height of the icon. A standard command icon has a size of MKI_ICON_COMMAND_SIZE (80) by MKI_ICON_COMMAND_SIZE (80) pixels, a standard menu icon has a size of MKI_ICON_MENU_SIZE (48) by MKI_ICON_MENU_SIZE (48) pixels.

IconMode

[__int32] This value determines whether the given IconHandle is valid or not:

If IconMode is set to zero, the bitmap identified by IconHandle must contain the command's or menu's icon at the location specified by IconXOffset and IconYOffset.

If IconMode is a positive non-zero value, this value is interpreted as a command identifier of an internal command whose command icon is to be used instead (e.g. MKI_MENU_DRAW_POLYLINE for a polyline).

If IconMode does not specify a valid command identifier (e.g. -1), the default icon for external commands is used. In the latter two cases, the values of IconHandle, IconXOffset and IconYOffset will be ignored. These two cases are not available for menu icons, i.e. a menu must always supply a valid IconHandle plus IconXOffset and IconYOffset!

 

CAD6interface 2024.2 - Copyright 2024 Malz++Kassner® GmbH