LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

menu bar properties

Hello
  I`m developing a WYSYWYG langauge editor library for my company  so the user can translate  our software  without  needing  to use  any  other tool. What we do is editing a template made with the User Interface Localizer tool that is later loaded by the main program. What we do is update the apropiate tag for each control.
  In the .lwl files each control has a section named with the fomat [PANELCONSTANTNAME_CONTROLCONSTANTNAME], I´m developing a general solution and what  I do is getting  these attributes from controls calling GetCtrlAttribute () in each control callback.
Here is my problem: menu items are tagged [MENUBARCONSTANTPREFIX_MENUTITLECONSTANTNAME_MENUITEMCONSTANTNAME], we can get the MENUBARCONSTANTPREFIX using GetMenuBarAttribute ( menuBarHandle,menuOrMenuItemID, ATTR_MENU_NAME, attributeValue), and MENUITEMCONSTANTNAME using GetMenuBarAttribute ( menuBarHandle,menuOrMenuItemID, ATTR_ITEM_NAME, attributeValue) but  we can`t get MENUTITLECONSTANTNAME ¿How could we solve this?
We tried to made a callback for the submenu title (to get that attribute when the user click on the menu title) but it doesn't works.

Thank you in advance

Antonio Jimenez.
0 Kudos
Message 1 of 2
(2,817 Views)
As far as I can see:
 
with
  GetMenuBarAttribute (menuH, 0, ATTR_CONSTANT_NAME, msg);
you get the menu bar constant prefix
 
with
  GetMenuBarAttribute (menuH, 0, ATTR_FIRST_MENU_ID, &nc);
  GetMenuBarAttribute (menuH, nc, ATTR_CONSTANT_NAME, msg);
you get the menu title constant name
 
with
  GetMenuBarAttribute (menuH, nc, ATTR_FIRST_ITEM_ID, &nc);
[ and subsequent GetMenuBarAttribute (menuH, nc, ATTR_NEXT_ITEM_ID, &nc); ]
  GetMenuBarAttribute (menuH, nc, ATTR_CONSTANT_NAME, msg);
you get the menu item constant name


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,803 Views)