MKI_DialogTrackPopup (Dialogs) Changed in Version 6.50

www.CAD6.com

C++ Syntax

__int32

MKI_DialogTrackPopup(

 HWND f_hWindow,

 MKI_CONST_POPUP_ENTRY_PTR f_pEntryList,

 __int32 f_nEntryCount,

 __int32 f_nCommandID,

 MKI_CONST_INTRECT_PTR f_pRect );

 

Displays the given menu entries as a tracking popup menu. This calls the Windows function TrackPopupMenu(), but with all required application-specific prefix and postfix code.

 

Parameters

Window

[HWND] Handle of the parent window to the tracking popup menu.

EntryList

[MKI_CONST_POPUP_ENTRY_PTR] Address a list of popup menu entries to be used.

EntryCount

[__int32] Number of subsequent entries in the menu entry list to be used for the top level menu. The maximum number of menu entries (including all submenu entries) is MKI_PLUGIN_POPUP_MAX.

CommandID

[__int32] ID of the command that shall be "active" during the menu display (i.e. whose command description and icon shall be visible) or 0 for "none". A good choice is the current plug-in command's ID.

Rect

[MKI_CONST_INTRECT_PTR] Address of the rectangle that states the position of a "button" that called the popup menu. The popup window will be placed either left or right to that button, depending on its position on the screen. If nullptr, the popup window will be places relative to the current mouse cursor's position.

 

Return Value

The ID of the menu item selected by the user, 0 if no item was selected, or -1 if an error occurred.

 

Make sure that no "active" menu entry has an ID of 0, because its selection would be reported as "user cancellation".

 

CAD6interface 2025.0 - Copyright 2025 Malz++Kassner® GmbH