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