// MoldKBE.cpp : Defines the initialization routines for the DLL.
//
#include "stdafx.h"
#include "MoldKBE.h"
#include "DlgCanshu1.h"
#include "Dlg2.h"
#include "DlgDP.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//
// Note!
//
// If this DLL is dynamically linked against the MFC
// DLLs, any functions exported from this DLL which
// call into MFC must have the AFX_MANAGE_STATE macro
// added at the very beginning of the function.
//
// For example:
//
// extern "C" BOOL PASCAL EXPORT ExportedFunction()
// {
// AFX_MANAGE_STATE(AfxGetStaticModuleState());
// // normal function body here
// }
//
// It is very important that this macro appear in each
// function, prior to any calls into MFC. This means that
// it must appear as the first statement within the
// function, even before any object variable declarations
// as their constructors may generate calls into the MFC
// DLL.
//
// Please see MFC Technical Notes 33 and 58 for additional
// details.
//
/////////////////////////////////////////////////////////////////////////////
// CMoldKBEApp
BEGIN_MESSAGE_MAP(CMoldKBEApp, CWinApp)
//{{AFX_MSG_MAP(CMoldKBEApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMoldKBEApp construction
CMoldKBEApp::CMoldKBEApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CMoldKBEApp object
CMoldKBEApp theApp;
/////////////////////////////////////////////////////////////////////////////
#include <uf_mb.h>
#include <odbcinst.h>
UF_MB_cb_status_t hanshu1();
UF_MB_cb_status_t hanshu2();
UF_MB_cb_status_t hanshu3();
static UF_MB_cb_status_t fun1(UF_MB_widget_t widget, UF_MB_data_t client_data, UF_MB_activated_button_p_t call_button)
{
return hanshu1();
}
static UF_MB_cb_status_t fun2(UF_MB_widget_t widget, UF_MB_data_t client_data, UF_MB_activated_button_p_t call_button)
{
return hanshu2();
}
static UF_MB_cb_status_t fun3(UF_MB_widget_t widget, UF_MB_data_t client_data, UF_MB_activated_button_p_t call_button)
{
return hanshu3();
}
static UF_MB_action_t action_table[] =
{
{"A1", fun1, NULL},
{"A2", fun2, NULL},
{"A3", fun3, NULL},
{NULL, NULL, NULL}
};
extern "C" DllExport void ufsta( char *param, int *returnCode, int rlen )
{
UF_initialize();
UF_MB_add_actions(action_table);
UF_terminate();
}
//----------------------------------------------------------------------------
// 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 "C" int ufusr_ask_unload( void )
{
return( UF_UNLOAD_UG_TERMINATE );
}
extern "C" void ufusr_cleanup(void)
{
}
UF_MB_cb_status_t hanshu1()
{
DlgCanshu1 dlg;
dlg.DoModal();
return UF_MB_CB_CONTINUE;
}
UF_MB_cb_status_t hanshu2()
{
CDlgDP dlg;
dlg.DoModal();
return UF_MB_CB_CONTINUE;
}
UF_MB_cb_status_t hanshu3()
{
return UF_MB_CB_CONTINUE;
} |