09-14-2005 08:10 AM
09-14-2005 08:34 AM
04-27-2006 04:36 AM
Maybe for CVI its normal. But not for someone that wanna style his own menu bar. Actually with exclamation mark i feel patronizing ... and I dont like that at all.
04-27-2006 11:32 AM
04-27-2006 01:31 PM
07-31-2019 02:19 AM
It's really irritating to have the exclamatory symbol in menu item. It has not been removed still in CVI2013 which i am using.
07-31-2019 02:27 AM
01-28-2021 04:35 PM
I ran into this recently when I moved Panels and Menubars into separate .uir files. I found a reference here:
https://zone.ni.com/reference/en-XX/help/370051AG-01/cvi/uiref/cviprogramming_with_menu_bars/
In my pre-existing code, I see we load a menu bar from a panel like this:
MenubarMaintenance = LoadMenuBar (PanelMaintenance, "PanelSVC.uir", MENUBAR_MA);
But using MenubarMaintenance for the handle of SetMenuBarAttribute returns -163 (The attribute passed is only valid for menu bars.):
SetMenuBarAttribute (MenubarMaintenance, MENUBAR_MA_RETURN, ATTR_SHOW_IMMEDIATE_ACTION_SYMBOL, FALSE);
SetMenuBarAttribute's menubarHandle parameter is described as:
menuBarHandle
Specifier for a particular menu bar that is currently in memory. You can obtain this handle from functions such as LoadMenuBar and NewMenuBar. If the menu bar was automatically loaded through LoadPanel, use GetPanelMenuBar to get the menu bar handle.
I am getting MENUBAR_MA_RETURN from the generated header file for the menubar:
/* Menu Bars, Menus, and Menu Items: */
#define MENUBAR_MA 1
#define MENUBAR_MA_RETURN 2 /* callback function: HideMaintenancePanel */
#define MENUBAR_MA_OPTIONS 3
#define MENUBAR_MA_OPTIONS_COMMUNICATIONS 4 /* callback function: ShowCommunicationsOptionsPanel */
...etc...
Is there a trick to using the menuBarHanlde return from LoadMenuBar() as the menuBarHandle in the SetMenuBarAttribute call?
Where is my typo?
01-28-2021 04:44 PM
Maybe a bug? I see it likes ATTR_DIMMED, but not ATTR_SHOW_IMMEDIATE_ACTION_SYMBOL:
// Works
SetMenuBarAttribute (menuBar, MENUBAR_MA_RETURN, ATTR_DIMMED, FALSE);
// Fails
SetMenuBarAttribute (menuBar, MENUBAR_MA_RETURN, ATTR_SHOW_IMMEDIATE_ACTION_SYMBOL, FALSE);
01-29-2021 05:28 AM
I tend to consider that an attribute of the whole menu bar and not of individual items, while dimmed is instead valid for individual items.
In effect you can see that attribute listed into "Menu appearance" group of attributes in the attribute selection window, no into "Menu and Item Settings" group. So you should pass 0 in Menu Item ID parameter and the exclamation mark will appear next to every immediate items in the menu bar.