点击OK。解决方案的目录结构如下:
如果现在进行编译(mkmk),会提示如下错误:
4. 添加CreateCommands和CreateToolbars方法
1). NewAddin.h头文件
“NewAddin.h”头文件最终完成如下:
// COPYRIGHT DassaultSystemes 2013
//=================================================================== //
// NewAddin.h
// Provide implementation to interface
// CATIPrtWksAddin
//
//=================================================================== //
// Usage notes: //
//===================================================================
//CAA2 Wizard Generation Report
//IMPLEMENTATION
// TIE: CATIPrtWksAddin
//End CAA2 Wizard Generation Report //
// Apr 2013 Creation: Code generated by the CAA wizard Administrator
//===================================================================
#ifndefNewAddin_H
#define NewAddin_H
#include \
#include \ //黄底为代码中添加的语句,以下相同
//-----------------------------------------------------------------------
/**
* Class representing xxx. *
*
Role: Provide the basic class function...
*
* It implements the interfaces :
*
*
*
* @hrefClassReference, Class#MethodReference, #InternalMethod... */
classNewAddin: public CATBaseUnknown {
CATDeclareClass; public:
// Standard constructors and destructors for an implementation class
// -----------------------------------------------------------------
NewAddin ();
virtual ~NewAddin ();
voidCreateCommands();
CATCmdContainer * CreateToolbars();
private:
// The copy constructor and the equal operator must not be implemented
// -------------------------------------------------------------------
NewAddin (NewAddin&);
NewAddin& operator=(NewAddin&); };
//-----------------------------------------------------------------------
#endif 在其中:
●添加了CreateCommands和CreateToolbars两个方法的声明;
●添加头文件包含语句:#include \;
2). NewAddin.cpp源文件
在“NewAddin.cpp”最终完成的代码如下:
// COPYRIGHT DassaultSystemes 2013
//=================================================================== //
// NewAddin.cpp
// Provide implementation to interface
// CATIPrtWksAddin //
//===================================================================