5 Add a custom menu

In the secondary development of Pro/E comprehensive skills tutorial: NGINEER, adding user-defined menus is the most basic and most commonly used technology.

User-defined menus can be added to the existing menu bars and menus in the Pro/E Comprehensive Skills Tutorial: NGINEER interface, such as in the menu bar menu such as “File”, or in the Pro/E Comprehensive Skills Tutorial: NGINEER Interface Add a menu bar menu that is in the same position as the menu bar menu such as "File". Or you can add a custom menu to the mode menu.

I recommend adding a menu bar menu on the Pro/E comprehensive skills tutorial: NGINEER interface, because Pro/E comprehensive skills tutorial: NGINEER is a constantly developing, constantly updated software, a menu bar menu or mode menu under a certain version, It may not be available in another version, so if the user-defined menu depends on a menu, it is likely to not work properly in another Pro/E synthesis tutorial: NGINEER version. In this way, the application can only be modified to accommodate this change, and the versatility of the software is poor. The following program details how to add the user-defined menu bar menu UserMenu to the Pro/E comprehensive skills tutorial: NGINEER interface and add the button "A" in the menu bar menu UserMenu.

Int user_initialize()

{ ProFileName message_file;

uiCmdCmdId cmd_id;

ProStringToWstring(message_file, "user_msg.txt") ;

ProMenubarMenuAdd("UserMenu","UserMenu", "Help", PRO_B_TRUE, message_file); //Add the user-defined menu bar menu UserMenu and put it in the menu bar menu "Help" ProCmdActionAdd("A", (uiCmdCmdActFn) Action, uiProe2ndImmediate, NULL, PRO_B_TRUE,

PRO_B_TRUE, &cmd_id); //Set the action action for button A

ProMenubarmenuPushbuttonAdd("UserMenu", "A", "A","Non-mode-specific Pro/TOOLK99v test

Commands, NULL , PRO_B_TRUE , cmd_id ,

Message_file); //Add button A in the menu bar menu UserMenu

Return(0);}

Previous page

Self-drilling Screw

Self-Drilling Screw,Self Tapping Screw,Stainless Steel Self Tapping Screws

Weihao Hardware Wire Mesh Products Co., Ltd. , http://www.hsbarbedwire.com

Posted on