iCAx开思工具箱

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 24550|回复: 0
打印 上一主题 下一主题

请问菜单程序和对话框资源文件

[复制链接]
跳转到指定楼层
楼主
发表于 2009-4-28 15:33:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册登录,享用更多网站功能!

您需要 登录 才可以下载或查看,没有帐号?立即注册

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);}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 支持支持
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手板模型制作,在线3D打印服务

QQ|小黑屋|手机版|开思工具箱 CAD工具箱_CAM工具箱  

GMT+8, 2024-11-15 01:40 , Processed in 0.009513 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表