zzabccn兄,看看我这样怎么还是不见程序运行界面呢?
cpp文件:
#include "stdafx.h"
#include "6.h"
#include "roToolkit.h"
#include "roMenu.h"
#include "roMenuBar.h"
#include "roUtil.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
static uiCmdAccessState TestAccessDefault(uiCmdAccessMode access_mode)
{
return (ACCESS_AVAILABLE);
}
void Check()
{
AfxMessageBox("haha");
}
/*====================================================================*\
FUNCTION : user_initialize()
PURPOSE : Pro/TOOLKIT程序的总入口,完成初始化工作
\*====================================================================*/
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, Check, PRO_B_TRUE, PRO_B_TRUE, [$cmd_id)]
-1菜单Menu2动作
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;
}
void user_terminate()
{
}
usermsg.txt文件:
USER Menu0
Tool Menu
#
#
USER Menu1
Menu1
#
#
USER Menu2
Menu1-1
#
#
USER Menu2 help
The help of this Menu
#
#
注册文件:
name 6
startup dll
exec_file d:\protoolkit\6\debug\6.dll
text_dir d:\protoolkit\6
revision 2001
allow_stop TRUE
end |