MKI_ICON_DATA (Basic Classes) Changed in Version 2017.1

www.CAD6.com

This class contains the description of a single icon.

 

C++ Syntax

class MKI_ICON_DATA

{

  public:

 

  MKI_BITMAP_PTR m_pIconBitmap;

  __int32 m_nIconXOffset,

          m_nIconYOffset,

          m_nIconXSize,

          m_nIconYSize,

          m_nIconMode;

 

  void

  Init(

 MKI_BITMAP_PTR f_pBitmap,

 __int32 f_nIconIndex = 0,

 __int32 f_nColumns = 1 ); New in Version 2026.1

};

 

Element Description

m_pIconBitmap 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!

m_nIconXOffset

m_nIconYOffset

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

m_nIconXSize New in Version 2015.2

m_nIconYSize

[__int32] These two values determine the icon's width and height. Standard size for command or menu icons is MKI_ICON_COMMAND_SIZE (80) by MKI_ICON_COMMAND_SIZE (80) pixels.

m_nIconMode

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

= 0

if zero, the bitmap identified by m_pIconBitmap must contain the command's or menu's icon at the location specified.

> 0

If positive non-zero, m_nIconMode is interpreted as a command identifier of an application-internal command whose icon is to be used instead, e.g. MKI_MENU_DRAW_LINE_STANDARD (501) for a line.

< 0

The default icon for external commands is used (usually a red toy block).

In the latter two cases, all other values will be ignored, m_pIconBitmap should be set to nullptr.

 

CAD6interface 2026.1 - Copyright 2026 Malz++Kassner® GmbH