iCAx开思工具箱
标题:
使用MFC时遇到的问题
[打印本页]
作者:
clamayi
时间:
2006-12-19 04:50
标题:
使用MFC时遇到的问题
我的.men文件是:
VERSION 120
EDIT UG_GATEWAY_MAIN_MENUBAR
BEFORE UG_HELP
CASCADE_BUTTON TEST
LABEL Test
END_OF_BEFORE
MENU TEST
BUTTON NEWTEST
LABEL New
ACTIONS test.dll
END_OF_MENU
在cpp文件中:
static UF_MB_cb_status_t new( UF_MB_widget_t widget, UF_MB_data_t client_data, UF_MB_activated_button_p_t button);
static UF_MB_action_t action_table[] = {
{ "test.dll",new, NULL },
{ NULL, NULL, NULL}
};
然后在函数new中主要实现打开一个文件对话框,我在其他环境中测试过能够正常打开。
extern "C" DllExport void ufsta (char *param, int *retcode, int rlen)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
int errcode=UF_initialize();
if(0==errcode)
{
UF_MB_add_actions(action_table);
}
errcode=UF_terminate();
UF_terminate();
return;
}
但不知道为什么不能打开文件对话框,好像没有执行new这个函数,那位大虾能帮我,谢谢!
作者:
gao264
时间:
2006-12-19 12:47
把AFX_MANAGE_STATE(AfxGetStaticModuleState());放到 UF_MB_add_actions(action_table);之后再编译试试
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3