Hi Spark,
If I have correctly understood your problem, you want to display in a string control the exact text you have loaded from the file and displayed in the popup menu.
Here you find a modified version of your source that displays the text in a message box: you can modify it to adapt to your needs. In the code it is not necessary to install a callback for menu items.
This is the source code for your quick_command callback:
switch (event) {
case EVENT_COMMIT:
command_menu = NewMenuBar (0);
new_menu = NewMenu(command_menu,"Hello",0);
for (i = 0; i < 5; i++) {
sprintf (msg, "Menu item #%d", i + 1);
addMenu = NewMenuItem (command_menu, new_menu, msg, -1, 0, 0, 0);
}
GetCtrlAttribute(panel,control,ATTR_LEFT,&left);
GetCtrlAttribute(panel,control,ATTR_TOP,&top);
i = RunPopupMenu(command_menu,new_menu,panel,top,left,0,0,0,0);
GetMenuBarAttribute (command_menu, i, ATTR_ITEM_NAME, msg);
MessagePopup ("Menu", msg);
break;
default:
break;
}
But, after considering it for a while, I wonder why you are not using a ring control that executes the exact thing you are trying to mimic with the popup menu...
Hope this helps
Roberto