ufsta入口函数中的LaunchCalculateDialog总是显示没有定义
#include <stdio.h>#include <uf.h>
#include <uf_ui.h>
#include "UG_UI.h"
#include <uf_mb.h>
#include "UG_UI_calculate_dialog.h"
/*****************************************************************************
**Activation Methods
*****************************************************************************/
/*Unigraphics Startup
** This entry point activates the application at Unigraphics startup */
extern DllExport void ufsta( char *param, int *returnCode, int rlen )
{
/* Initialize the API environment */
static UF_MB_cb_status_t UG_UI_Test_Dialog_fun( UF_MB_widget_t,
UF_MB_data_t,UF_MB_activated_button_p_t );
static UF_MB_action_t actionTable[]=
{
{"UG_UI_ACTION",UG_UI_Test_Dialog_fun,NULL},
{NULL,NULL,NULL}
};
int errorCode = UF_initialize();
if ( 0 == errorCode )
{
UF_MB_add_actions(actionTable);
errorCode = UF_terminate();
}
PrintErrorMessage( errorCode );
}
static UF_MB_cb_status_t UG_UI_Test_Dialog_fun(
UF_MB_widget_t widget,
UF_MB_data_t client_data,
UF_MB_activated_button_p_t call_button
)
{
UG_UI_calculate_data m_data;
int response;
LaunchCalculateDialog( &response ,&m_data);
return UF_MB_CB_CONTINUE ;
}
/*****************************************************************************
**Utilities
*****************************************************************************/
/* Unload Handler
** This function specifies when to unload your application from Unigraphics.
** If your application registers a callback (from a MenuScript item or a
** User Defined Object for example), this function MUST return
** "UF_UNLOAD_UG_TERMINATE". */
extern int ufusr_ask_unload( void )
{
return( UF_UNLOAD_IMMEDIATELY );
}
/* PrintErrorMessage
**
** Prints error messages to standard error and the Unigraphics status
** line. */
static void PrintErrorMessage( int errorCode )
{
if ( 0 != errorCode )
{
/* Retrieve the associated error message */
char message;
UF_get_fail_message( errorCode, message );
/* Print out the message */
UF_UI_set_status( message );
fprintf( stderr, "%s\n", message );
}
}
以上代码编译之后显示
d:\ugkf\lesson1\ug_ui\ug_ui\ug_ui.c(54) : warning C4013: 'LaunchCalculateDialog' undefined; assuming extern returning int
d:\ugkf\lesson1\ug_ui\ug_ui\ug_ui.c(55) : error C2065: 'UF_MB_CB_CONTUNUE' : undeclared identifier
自己怎么都解决不了,不知道哪位大哥可以指点一下小弟
LaunchCalculateDialog( &response ,&m_data);
不是API函数,你没定义,当然不能使用
页:
[1]