MKI_DialogCollectionShowMenu (Dialogs) New in Version 2020.0

www.CAD6.com

C++ Syntax

__int32

MKI_DialogCollectionShowMenu(

 HWND f_hWindow,

 __int32 f_nCtlID,

 __int32 f_nType,

 const LPCWSTR f_pszTypeName,

 bool f_fAllowPut,

 bool f_fAllowGet );

 

Displays the standard context menu for pinboard and collection handling.

 

If you wish to handle standard collection item types such as element names or colors, use more the powerful commands like MKI_DialogCollectionHandleName or MKI_DialogCollectionHandleColor instead.

 

Parameters

Window

[HWND] Handle of the dialog window whose control was clicked.

CtlID

[__int32] ID of the control that was clicked (only used to position the context menu).

Type

[__int32] Type of collection item. For standard collection types, see MKI_COLLECTION_TYPE_*. Use a negative value for an unspecified type.

TypeName

[const LPCWSTR] If not nullptr, address of the name of the type of collection item. This name will be included with the context menu to show the user what will be handled in this menu. If nullptr, no specific type of item will be stated.

AllowPut

[bool] Determines whether the commands for saving data to the pinboard and to the collections shall be available (enabling the user to store current data if known).

AllowGet

[bool] Determines whether the commands for retrieving data from the pinboard and from the collections shall be available (enabling the user to changing the current data).

 

Return Value

Returns the identifier of the menu item selected:

 

MKI_CONTEXT_PINBOARD_PUT

Add an unnamed item to the pinboard.

 

MKI_CONTEXT_PINBOARD_GET

Retrieve an unnamed item from the pinboard.

 

MKI_CONTEXT_COLLECTION_GET

Add a named item to a collection.

 

MKI_CONTEXT_COLLECTION_PUT

Retrieve a named item from a collection.

 

MKI_CONTEXT_COLLECTION_MANAGE

Manage all named items of the given type in collections.

 

If no menu item was selected, 0 is returned. If an error occurred, -1 is returned.

 

CAD6interface 2025.0 - Copyright 2025 Malz++Kassner® GmbH