ImageVerifierCode 换一换
格式:DOCX , 页数:25 ,大小:20.87KB ,
资源ID:22757990      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/22757990.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(直齿花键C语言程序源代码Word文档下载推荐.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

直齿花键C语言程序源代码Word文档下载推荐.docx

1、=*/*= Purpose: This TEMPLATE file contains C source and static structures to guide you in the construction of your NX Open application dialog. The generation of your dialog file (.dlg extension) is the first step towards dialog construction within Unigraphics. You must now create a UGOpen applicatio

2、n that utilizes this file (.dlg). The information in this file provides you with the following: 1. Help on the use of the functions, UF_MB_add_styler_actions and UF_STYLER_create_dialog in your NX Open application. These functions will load and display your UIStyler dialog in Unigraphics. An example

3、 of the function, UF_MB_add_styler_actions to associate your dialog to the menubar is shown below (Search on Example 1). An example of a invoking a dialog from a callback utilizing UF_STYLER_create_dialog is also shown below (Search for Example 2). An example of a user exit utilizing UF_STYLER_creat

4、e_dialog is also shown below (Search for Example 3). 2. The callback structure: - CHANGE_cbs - This structure is VERY important if you have callbacks associated with your dialog. It correlates the dialog items in your dialog with the callback functions you must supply. You should not modify this str

5、ucture since it MUST match up to the information stored in your dialog file (.dlg). Any attempt to do so will cause an error while constructing your dialog. If you wish to modify the association of your callbacks to your dialog, please reload your dialog file (.dlg) into the UIStyler and regenerate

6、your files. You do not need to be concerned about this structure, simply pass it as an argument to the function, UF_STYLER_create_dialog along with your dialog file (.dlg). Example 1 displays the actual call you may make for this particular dialog. 3. The empty callback functions (stubs) associated

7、with your dialog items have also been placed in this file. These empty functions have been created simply to start you along with your coding requirements. The function name, argument list and possible return values have already been provided for you. NOTE: Each callback must be wrappered with the f

8、unctions UF_initialize() and UF_terminate(). /* These include files are needed for the following template code. */#include uf.huf_defs.huf_exit.huf_ui.huf_styler.huf_mb.hstdlib.huf_modl_expressions.huf_part.huf_modl.h#include spline_dialog.h/* The following definition defines the number of callback

9、entries */* in the callback structure: */* UF_STYLER_callback_info_t CHANGE_cbs */#define SPLINE_CB_COUNT ( 4 + 1 ) /* Add 1 for the terminator */*-The following structure defines the callback entries used by the styler file. This structure MUST be passed into the user function, UF_STYLER_create_dia

10、log along with CHANGE_CB_COUNT. -*/static UF_STYLER_callback_info_t SPLINE_cbsSPLINE_CB_COUNT = UF_STYLER_DIALOG_INDEX, UF_STYLER_CONSTRUCTOR_CB , 0, SPLINE_constructor, UF_STYLER_DIALOG_INDEX, UF_STYLER_DESTRUCTOR_CB , 0, SPLINE_destructor, UF_STYLER_DIALOG_INDEX, UF_STYLER_OK_CB , 0, SPLINE_ok, UF

11、_STYLER_DIALOG_INDEX, UF_STYLER_CANCEL_CB , 0, SPLINE_cancel, UF_STYLER_NULL_OBJECT, UF_STYLER_NO_CB, 0, 0 ;UF_MB_styler_actions_t contains 4 fields. These are defined as follows:Field 1 : the name of your dialog that you wish to display.Field 2 : any client data you wish to pass to your callbacks.F

12、ield 3 : your callback structure.Field 4 : flag to inform menubar of your dialog location. This flag MUST match the resource set in your dialog! Do NOT ASSUME that changing this field will update the location of your dialog. Please use the UIStyler to indicate the position of your dialog.static UF_M

13、B_styler_actions_t actions = spline_dialog.dlg, NULL, SPLINE_cbs, UF_MB_STYLER_IS_NOT_TOP , NULL, NULL, NULL, 0 /* This is a NULL terminated list */*- MENUBAR HOOKUP HELP Example -To launch this dialog from a Unigraphics menubar, you must follow the steps below.1) Add the following lines to your Men

14、uScript file in order to associate a menu bar button with your dialog. In this example, a cascade menu will be created and will be located just before the Help button on the main menubar. The button, SPLINE_DIALOG_BTN is set up to launch your dialog and will be positioned as the first button on your

15、 pulldown menu. If you wish to add the button to an existing cascade, simply add the 3 lines between MENU LAUNCH_CASCADE and END_OF_MENU to your menuscript file. The MenuScript file requires an extension of .men. Make sure that you add the extension to the file and place the file in your startup dir

16、ectory: $UGII_USER_DIR/startup or $UGII_SITE_DIR/startup or $UGII_VENDOR_DIR/startup directory Move the contents between the dashed lines to your Menuscript file. - VERSION 120 EDIT UG_GATEWAY_MAIN_MENUBAR BEFORE UG_HELP CASCADE_BUTTON UISTYLER_DLG_CASCADE_BTN LABEL Dialog Launcher END_OF_BEFORE MEN

17、U UISTYLER_DLG_CASCADE_BTN BUTTON SPLINE_DIALOG_BTN LABEL Display spline_dialog dialog ACTIONS spline_dialog.dlg END_OF_MENU -2) Issue a call to the function, UF_MB_add_styler_actions from the ufsta user exit as shown below. To use this call, remove the conditional definitions: #ifdef MENUBAR_COMMEN

18、TED_OUT #endif MENUBAR_COMMENTED_OUT The static structure, actions, will allow you to associate ALL of your dialogs and callback functions to the menubar at once. For example, if you wish to have 10 dialogs associated to 10 different buttons on the menubar, you may enter each dialog and callback lis

19、t into the actions structure. Make sure that you have created a corresponding button in your MenuScript file. You may also have separate shared libraries, each with a ufsta user exit for each individual dialog.3) Place your compiled and linked ufsta user function in $UGII_VENDOR_DIR/startup director

20、y. NOTE: The user function must contain the proper extension .so, .sl or .dll to make ensure that it is recognized by the MenuScript. If it does not have the proper extension, it will NOT be recognized by MenuScript. The action name you have provided in your MenuScript must correspond to to the dial

21、og name provided in the action structure. This MUST match inorder to bind your dlg file to your MenuScript button. 4) Copy your UIStyler dialog file to the proper directory. All dialog files (.dlg) must be located in $UGII_USER_DIR/application or $UGII_SITE_DIR/application or $UGII_VENDOR_DIR/applic

22、ation directory-*/#ifdef MENUBAR_COMMENTED_OUTextern void ufsta (char *param, int *retcode, int rlen) int error_code; if ( (UF_initialize() != 0) return; if ( (error_code = UF_MB_add_styler_actions ( actions ) ) != 0 ) char fail_message133; UF_get_fail_message(error_code, fail_message); printf ( %sn

23、, fail_message ); UF_terminate();/#endif /*MENUBAR_COMMENTED_OUT*/*-DIALOG CREATION FROM A CALLBACK HELP Example -If you wish to have this dialog displayed from the callback of another UIStyler dialog, you should:1) Make sure that the callback of your UIStyler dialog is designated as a dialog buildi

24、ng callback. 2) Remove the conditional definitions: #ifdef DISPLAY_FROM_CALLBACK #endif DISPLAY_FROM_CALLBACK3) Your callback should issue a call to this function.4) You should also add the funcitonal prototype to your header file (spline_dialog.h) and ensure that the file is properly included.All d

25、ialog files must be located in -*/#ifdef DISPLAY_FROM_CALLBACKextern int ( int *response ) int error_code = 0; if ( ( error_code = UF_initialize() ) != 0 ) return (0) ; if ( ( error_code = UF_STYLER_create_dialog ( , CHANGE_cbs, /* Callbacks from dialog */ CHANGE_CB_COUNT, /* number of callbacks*/ NULL, /* This is your client data */ response ) ) ! /* Get the user function fail message based on the fail code.*/ UF_UI_set_status (fail_message);%s

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1