刚起步就遇到这些问题,头痛的是不能找不出错误的原因,请教各位老大,
请赐教啊!!
以上的步骤都是按高手示例一步一步做的,搞不清楚为什么我的不行呢?
#include <roToolkit.h>
#include <roMenu.h>
#include <roMenuBar.h>
#include <roUtil.h>
static uiCmdAccessState TestAccessDefault(uiCmdAccessMode access_mode)
{
return (ACCESS_AVAILABLE);
}
void Check()
{
AfxMessageBox("CONSUMMATION!");
}
/*====================================================================*\
FUNCTION : user_initialize()
PURPOSE : Pro/TOOLKIT程序的总入口,完成初始化工作
\*====================================================================*/
extern "C" int user_initialize(
int argc,
char *argv[],
char *version,
char *build,
wchar_t errbuf[80])
{
 roError status;
uiCmdCmdId cmd_id;
ProFileName mf;
ProStringToWstring(mf,"usermsg.txt");
status = ProMenubarMenuAdd ("Menu0", "USER Menu0",
"Help", PRO_B_TRUE, mf);
// 0添加父菜单Menu0
status = ProMenubarmenuMenuAdd ("Menu0", "Menu1", "USER Menu1",
NULL, PRO_B_TRUE, mf);
添加弹出式菜单Menu1
status = ProCmdActionAdd("Menu2", (uiCmdCmdActFn)Check,
uiCmdPrioDefault, TestAccessDefault, PRO_B_TRUE, PRO_B_TRUE, [$cmd_id)]
-1菜单Menu2动作
status = ProMenubarmenuPushbuttonAdd ("Menu1", "Menu2",
"USER Menu2", "USER Menu2 help", NULL, PRO_B_TRUE,cmd_id, mf);
-1添加菜单Menu2
return 0;
}
extern "C" void user_terminate()
{
} |