2014-07-28 21:38:57|?次阅读|上传:wustguangh【已有?条评论】发表评论
关键词:C/C++, CAA, CATIA|来源:唯设编程网
使用CAA进行CATIA二次开发的时候,总是难免要和用户界面打交道,本文通过一个详细例子,介绍CAA开发对话框程序的详细流程。通常,使用CAA开发一个对话框程序的基本流程是:创建一个用于生产对话框的Module-> 创建交互式的Application-> 创建应用程序窗口(Window)-> 编译工程-> 生产代码提示-> 运行工程。
首先将Framework设置为当前活动项目,然后在其中新建一个名为CAADlgHelloApplication的Module,设置如下:
.png)
.jpg)
.png)
#ifndef CAADlgHelloApplication_H
#define CAADlgHelloApplication_H
// COPYRIGHT DASSAULT SYSTEMES 2003
//=============================================================================
// Abstract of the sample
// -----------------------
//
// This sample shows how implement a CATInteractiveApplication.
//
//=============================================================================
// How to Launch the sample:
// -------------------------
//
// Type:
// mkrun -c CAADlgHelloApplication
//
//=============================================================================
// Dialog Framework
#include "CATInteractiveApplication.h"
// Local Framework
class CAADlgHelloApplication: public CATInteractiveApplication {
public:
// Constructs the application given an identifier
// Parameters:
// iIdentifier:
// The identifier
CAADlgHelloApplication(const CATString &iIdentifier);
virtual ~CAADlgHelloApplication();
//Contains the application code
void BeginApplication();
//Returns the application return code.
int EndApplication();
private:
// Default constructor, not implemented
// Set as private to prevent from compiler automatic creation as public.
CAADlgHelloApplication ();
// Copy constructor, not implemented
// Set as private to prevent from compiler automatic creation as public.
CAADlgHelloApplication(const CAADlgHelloApplication &iObjectToCopy);
// Assignment operator, not implemented
// Set as private to prevent from compiler automatic creation as public.
CAADlgHelloApplication & operator = (const CAADlgHelloApplication &iObjectToCopy);
};
#endif