马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
请问菜单程序和对话框资源文件是怎么联系起来的?
下面是我的菜单程序
但是没有看见那里能联系到对话框资源文件啊
这个能开发出菜单
但是点击相应菜单怎么调用对话框啊?谢谢
#include "stdafx.h"
#include "Program.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include"ProMenu.h"
#include"ProUtil.h"
#include"ProMenubar.h"
#include
#include"ProUtil.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include"ProMenu.h"
#include"ProUtil.h"
#include"ProMenubar.h"
#define OK 1
#define CANCEL 0
ProMdl *session_mdls;//当前进程中所有零件模型的句柄数组
ProModel *p_array; //当前组件中所有零件的句柄数组
ProMdlType mdl_type;//模型类型
// 函数声明
void CANCEL_Action(char *, char *, ProAppData);
void Load_Action(char *, char *, ProAppData);
void List1_Action(char *, char *, ProAppData);
void ListLabesSet1(char *, char *);
int Program1_1MenuActFn();
int Program1_2MenuActFn();
int Program1_3MenuActFn();
int Program1_4MenuActFn();
int Program1_5MenuActFn();
static uiCmdAccessState AccessAvailable (uiCmdAccessMode);
/////////////////////////////////////////////////////////////////////////////
// CExample7App
BEGIN_MESSAGE_MAP(CExample7App, CWinApp)
//{{AFX_MSG_MAP(CExample7App)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CExample7App construction
CExample7App::CExample7App()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}/////////////////////////////////////////////////////////////////////////////
// The one and only CExample7App object
CExample7App theApp;
extern "C" int user_initialize()
{
ProError status;
ProFileName MessageFILE;
uiCmdCmdId cmd_id1,cmd_id2,cmd_id3,cmd_id4,cmd_id5;
ProStringToWstring(MessageFILE, "Message.txt");
// 添加菜单条
status=ProMenubarMenuAdd ("Program", "Mainmenu","Utilities", PRO_B_TRUE, MessageFILE); ProCmdActionAdd("PushButtonAct1",(uiCmdCmdActFn)Program1_1MenuActFn, uiCmdPrioDefault,AccessAvailable,PRO_B_TRUE,PRO_B_TRUE,&cmd_id1);
ProMenubarmenuPushbuttonAdd("Program", "Program1-1", "Program1-1","Diao Yong",NULL,PRO_B_TRUE,cmd_id1, MessageFILE);
ProMenubarmenuMenuAdd("Program", "SubMenu", "SubMenu", "Program1-1", PRO_B_TRUE, MessageFILE);
ProCmdActionAdd("PushButtonAct2",(uiCmdCmdActFn)Program1_2MenuActFn,uiCmdPrioDefault,AccessAvailable,PRO_B_TRUE,PRO_B_TRUE,&cmd_id2);
ProMenubarmenuPushbuttonAdd("SubMenu", "Program1-2", "Program1-2","Parameter design1", NULL,PRO_B_TRUE, cmd_id2, MessageFILE);
ProCmdActionAdd("PushButtonAct3",(uiCmdCmdActFn)Program1_3MenuActFn,uiCmdPrioDefault,AccessAvailable,PRO_B_TRUE,PRO_B_TRUE,&cmd_id3);
ProMenubarmenuPushbuttonAdd("SubMenu", "Program1-3", "Program1-3","Parameter design2", NULL, PRO_B_TRUE, cmd_id3, MessageFILE);
ProCmdActionAdd("PushButtonAct4",(uiCmdCmdActFn)Program1_4MenuActFn,uiCmdPrioDefault,AccessAvailable, PRO_B_TRUE,PRO_B_TRUE,&cmd_id4);
ProMenubarmenuPushbuttonAdd("SubMenu", "Program1-4", "Program1-4",
"Parameter design3", NULL,PRO_B_TRUE, cmd_id4, MessageFILE); ProCmdActionAdd("PushButtonAct5",(uiCmdCmdActFn)Program1_5MenuActFn, uiCmdPrioDefault,AccessAvailable,PRO_B_TRUE,PRO_B_TRUE,&cmd_id5);
ProMenubarmenuPushbuttonAdd("Program","Program1-5","Program1-5","DESIGN",NULL,PRO_B_TRUE,cmd_id5, MessageFILE);
return status;
}
extern "C" void user_terminate()
{ AFX_MANAGE_STATE(AfxGetStaticModuleState());
}
static uiCmdAccessState AccessAvailable (uiCmdAccessMode access_mode)
{ return (ACCESS_AVAILABLE);} |