这只是其中一个,不知道怎么解决!!
头文件都包含了,跟examples里面包含的都是一样的!!
请高手帮忙!!
11 个解决方案
#1
up
#2
高手帮忙啊!!
#3
要看代码了
#4
class PACKAGE TEditor : public TDefaultEditor
{
protected:
virtual void __fastcall EditProperty(const _di_IProperty Prop, bool& Continue);
public:
// virtual void __fastcall Edit();
virtual void __fastcall ExecuteVerb(int Index);
virtual AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
__fastcall virtual TEditor(TComponent* AComponent, _di_IDesigner ADesigner);
__fastcall virtual ~TEditor(void);
};
元件编辑器的声明部分!!
__fastcall TEditor::TEditor(TComponent* AComponent, _di_IDesigner ADesigner)
: TDefaultEditor(AComponent, ADesigner) { }
__fastcall TEditor::~TEditor(void) { }
void __fastcall TEditor::EditProperty(const _di_IProperty Prop, bool& Continue)
{
String PropName(Prop->GetName());
if (strcmpi(PropName.c_str(),"ANGLES") == 0){
Prop->Edit();
Continue = false;
}
}
int __fastcall TEditor::GetVerbCount()
{
return 1;
}
String __fastcall TEditor::GetVerb(Integer Index)
{
/* if (Index == 0)
return loadString(EditAngle_RC);
else */
return String("");
}
void __fastcall TEditor::ExecuteVerb(Integer Index)
{
if (Index == 0) Edit();
}
元件编辑器的定义部分!!
{
protected:
virtual void __fastcall EditProperty(const _di_IProperty Prop, bool& Continue);
public:
// virtual void __fastcall Edit();
virtual void __fastcall ExecuteVerb(int Index);
virtual AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
__fastcall virtual TEditor(TComponent* AComponent, _di_IDesigner ADesigner);
__fastcall virtual ~TEditor(void);
};
元件编辑器的声明部分!!
__fastcall TEditor::TEditor(TComponent* AComponent, _di_IDesigner ADesigner)
: TDefaultEditor(AComponent, ADesigner) { }
__fastcall TEditor::~TEditor(void) { }
void __fastcall TEditor::EditProperty(const _di_IProperty Prop, bool& Continue)
{
String PropName(Prop->GetName());
if (strcmpi(PropName.c_str(),"ANGLES") == 0){
Prop->Edit();
Continue = false;
}
}
int __fastcall TEditor::GetVerbCount()
{
return 1;
}
String __fastcall TEditor::GetVerb(Integer Index)
{
/* if (Index == 0)
return loadString(EditAngle_RC);
else */
return String("");
}
void __fastcall TEditor::ExecuteVerb(Integer Index)
{
if (Index == 0) Edit();
}
元件编辑器的定义部分!!
#5
namespace WaveReg
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TMyWave)};
RegisterComponents("Samples", classes, 0);
RegisterComponentEditor(__classid(TMyWave),__classid(TEditor));
}
}
注册元件的代码!!
以上的都在一个设计包里面,元件的代码在运行包里面!!
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TMyWave)};
RegisterComponents("Samples", classes, 0);
RegisterComponentEditor(__classid(TMyWave),__classid(TEditor));
}
}
注册元件的代码!!
以上的都在一个设计包里面,元件的代码在运行包里面!!
#6
#include <DesignIntf.hpp>
#include <DesignEditors.hpp>
#include <VCLEditors.hpp>
#include <RTLConsts.hpp>
class PACKAGE TEditor : public TDefaultEditor
{
protected:
//#if (__BORLANDC__ < 0x0560)
virtual void __fastcall EditProperty(const _di_IProperty Prop, bool& Continue);
//#endif
public:
virtual void __fastcall ExecuteVerb(int Index);
virtual AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
#if (__BORLANDC__ < 0x0560)
__fastcall virtual TEditor(TComponent* AComponent, _di_IDesigner ADesigner);
__fastcall virtual ~TEditor(void);
#endif
};
#if (__BORLANDC__ < 0x0560)
__fastcall TEditor::TEditor(TComponent* AComponent, _di_IDesigner ADesigner)
: TDefaultEditor(AComponent, ADesigner) { }
__fastcall TEditor::~TEditor(void) { }
#endif
//#if (__BORLANDC__ < 0x0560)
void __fastcall TEditor::EditProperty(const _di_IProperty Prop, bool& Continue)
{
String PropName(Prop->GetName());
if (strcmpi(PropName.c_str(),"ANGLES") == 0){
Prop->Edit();
Continue = false;
}
}
//#endif
int __fastcall TEditor::GetVerbCount()
{
return 1;
}
String __fastcall TEditor::GetVerb(Integer Index)
{
/* if (Index == 0)
return loadString(EditAngle_RC);
else
return String("");*/
String Name="";
/*
switch(Index){
case 0:
Name = "About ..."; // This is default to dbl-click
break;
case 1:
Name = "Edit NcCommunication";
break;
default:
break;
}*/
return Name;
}
void __fastcall TEditor::ExecuteVerb(Integer Index)
{
//if (Index == 0) Edit();
switch(Index){
case 0:
((TEdit?? *)Component)->Edit(); //your edit
break;
default:
break;
}
}
#include <DesignEditors.hpp>
#include <VCLEditors.hpp>
#include <RTLConsts.hpp>
class PACKAGE TEditor : public TDefaultEditor
{
protected:
//#if (__BORLANDC__ < 0x0560)
virtual void __fastcall EditProperty(const _di_IProperty Prop, bool& Continue);
//#endif
public:
virtual void __fastcall ExecuteVerb(int Index);
virtual AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
#if (__BORLANDC__ < 0x0560)
__fastcall virtual TEditor(TComponent* AComponent, _di_IDesigner ADesigner);
__fastcall virtual ~TEditor(void);
#endif
};
#if (__BORLANDC__ < 0x0560)
__fastcall TEditor::TEditor(TComponent* AComponent, _di_IDesigner ADesigner)
: TDefaultEditor(AComponent, ADesigner) { }
__fastcall TEditor::~TEditor(void) { }
#endif
//#if (__BORLANDC__ < 0x0560)
void __fastcall TEditor::EditProperty(const _di_IProperty Prop, bool& Continue)
{
String PropName(Prop->GetName());
if (strcmpi(PropName.c_str(),"ANGLES") == 0){
Prop->Edit();
Continue = false;
}
}
//#endif
int __fastcall TEditor::GetVerbCount()
{
return 1;
}
String __fastcall TEditor::GetVerb(Integer Index)
{
/* if (Index == 0)
return loadString(EditAngle_RC);
else
return String("");*/
String Name="";
/*
switch(Index){
case 0:
Name = "About ..."; // This is default to dbl-click
break;
case 1:
Name = "Edit NcCommunication";
break;
default:
break;
}*/
return Name;
}
void __fastcall TEditor::ExecuteVerb(Integer Index)
{
//if (Index == 0) Edit();
switch(Index){
case 0:
((TEdit?? *)Component)->Edit(); //your edit
break;
default:
break;
}
}
#7
1add
#include <DesignIntf.hpp>
#include <DesignEditors.hpp>
#include <VCLEditors.hpp>
#include <RTLConsts.hpp>
2 add bpi
designide.bpi to ur's project 's Requires node.
3使用bcb 源程序编译出来一下文件复制到$(bcb)\lib\obj
designconst.dcu
designconst.obj
designeditors.dcu
designeditors.obj
designintf.dcu
designintf.obj
designmenus.dcu
designmenus.obj
vcleditors.dcu
vcleditors.obj
4
toolsapi 什么的。我忘记了,你先调试看看。
#include <DesignIntf.hpp>
#include <DesignEditors.hpp>
#include <VCLEditors.hpp>
#include <RTLConsts.hpp>
2 add bpi
designide.bpi to ur's project 's Requires node.
3使用bcb 源程序编译出来一下文件复制到$(bcb)\lib\obj
designconst.dcu
designconst.obj
designeditors.dcu
designeditors.obj
designintf.dcu
designintf.obj
designmenus.dcu
designmenus.obj
vcleditors.dcu
vcleditors.obj
4
toolsapi 什么的。我忘记了,你先调试看看。
#8
namespace WaveReg--〉首字母大写以外的字母必须小写。Wavereg
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TMyWave)};
RegisterComponents("Samples", classes, 0);
RegisterComponentEditor(__classid(TMyWave),__classid(TEditor));
}
}
注册元件的代码!!
以上的都在一个设计包里面,元件的代码在运行包里面!!
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TMyWave)};
RegisterComponents("Samples", classes, 0);
RegisterComponentEditor(__classid(TMyWave),__classid(TEditor));
}
}
注册元件的代码!!
以上的都在一个设计包里面,元件的代码在运行包里面!!
#9
不行啊,而且根本就没有产生dcu文件啊!!
#10
你把上面指定的pas文件找到,加入一个工程一编译就生成dcu obj,
不过前提是你编译的时候提是你少了这些文件才需要阿,如果不要这些你可以不用作的。
不过前提是你编译的时候提是你少了这些文件才需要阿,如果不要这些你可以不用作的。
#11
好的,我试试!!
#1
up
#2
高手帮忙啊!!
#3
要看代码了
#4
class PACKAGE TEditor : public TDefaultEditor
{
protected:
virtual void __fastcall EditProperty(const _di_IProperty Prop, bool& Continue);
public:
// virtual void __fastcall Edit();
virtual void __fastcall ExecuteVerb(int Index);
virtual AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
__fastcall virtual TEditor(TComponent* AComponent, _di_IDesigner ADesigner);
__fastcall virtual ~TEditor(void);
};
元件编辑器的声明部分!!
__fastcall TEditor::TEditor(TComponent* AComponent, _di_IDesigner ADesigner)
: TDefaultEditor(AComponent, ADesigner) { }
__fastcall TEditor::~TEditor(void) { }
void __fastcall TEditor::EditProperty(const _di_IProperty Prop, bool& Continue)
{
String PropName(Prop->GetName());
if (strcmpi(PropName.c_str(),"ANGLES") == 0){
Prop->Edit();
Continue = false;
}
}
int __fastcall TEditor::GetVerbCount()
{
return 1;
}
String __fastcall TEditor::GetVerb(Integer Index)
{
/* if (Index == 0)
return loadString(EditAngle_RC);
else */
return String("");
}
void __fastcall TEditor::ExecuteVerb(Integer Index)
{
if (Index == 0) Edit();
}
元件编辑器的定义部分!!
{
protected:
virtual void __fastcall EditProperty(const _di_IProperty Prop, bool& Continue);
public:
// virtual void __fastcall Edit();
virtual void __fastcall ExecuteVerb(int Index);
virtual AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
__fastcall virtual TEditor(TComponent* AComponent, _di_IDesigner ADesigner);
__fastcall virtual ~TEditor(void);
};
元件编辑器的声明部分!!
__fastcall TEditor::TEditor(TComponent* AComponent, _di_IDesigner ADesigner)
: TDefaultEditor(AComponent, ADesigner) { }
__fastcall TEditor::~TEditor(void) { }
void __fastcall TEditor::EditProperty(const _di_IProperty Prop, bool& Continue)
{
String PropName(Prop->GetName());
if (strcmpi(PropName.c_str(),"ANGLES") == 0){
Prop->Edit();
Continue = false;
}
}
int __fastcall TEditor::GetVerbCount()
{
return 1;
}
String __fastcall TEditor::GetVerb(Integer Index)
{
/* if (Index == 0)
return loadString(EditAngle_RC);
else */
return String("");
}
void __fastcall TEditor::ExecuteVerb(Integer Index)
{
if (Index == 0) Edit();
}
元件编辑器的定义部分!!
#5
namespace WaveReg
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TMyWave)};
RegisterComponents("Samples", classes, 0);
RegisterComponentEditor(__classid(TMyWave),__classid(TEditor));
}
}
注册元件的代码!!
以上的都在一个设计包里面,元件的代码在运行包里面!!
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TMyWave)};
RegisterComponents("Samples", classes, 0);
RegisterComponentEditor(__classid(TMyWave),__classid(TEditor));
}
}
注册元件的代码!!
以上的都在一个设计包里面,元件的代码在运行包里面!!
#6
#include <DesignIntf.hpp>
#include <DesignEditors.hpp>
#include <VCLEditors.hpp>
#include <RTLConsts.hpp>
class PACKAGE TEditor : public TDefaultEditor
{
protected:
//#if (__BORLANDC__ < 0x0560)
virtual void __fastcall EditProperty(const _di_IProperty Prop, bool& Continue);
//#endif
public:
virtual void __fastcall ExecuteVerb(int Index);
virtual AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
#if (__BORLANDC__ < 0x0560)
__fastcall virtual TEditor(TComponent* AComponent, _di_IDesigner ADesigner);
__fastcall virtual ~TEditor(void);
#endif
};
#if (__BORLANDC__ < 0x0560)
__fastcall TEditor::TEditor(TComponent* AComponent, _di_IDesigner ADesigner)
: TDefaultEditor(AComponent, ADesigner) { }
__fastcall TEditor::~TEditor(void) { }
#endif
//#if (__BORLANDC__ < 0x0560)
void __fastcall TEditor::EditProperty(const _di_IProperty Prop, bool& Continue)
{
String PropName(Prop->GetName());
if (strcmpi(PropName.c_str(),"ANGLES") == 0){
Prop->Edit();
Continue = false;
}
}
//#endif
int __fastcall TEditor::GetVerbCount()
{
return 1;
}
String __fastcall TEditor::GetVerb(Integer Index)
{
/* if (Index == 0)
return loadString(EditAngle_RC);
else
return String("");*/
String Name="";
/*
switch(Index){
case 0:
Name = "About ..."; // This is default to dbl-click
break;
case 1:
Name = "Edit NcCommunication";
break;
default:
break;
}*/
return Name;
}
void __fastcall TEditor::ExecuteVerb(Integer Index)
{
//if (Index == 0) Edit();
switch(Index){
case 0:
((TEdit?? *)Component)->Edit(); //your edit
break;
default:
break;
}
}
#include <DesignEditors.hpp>
#include <VCLEditors.hpp>
#include <RTLConsts.hpp>
class PACKAGE TEditor : public TDefaultEditor
{
protected:
//#if (__BORLANDC__ < 0x0560)
virtual void __fastcall EditProperty(const _di_IProperty Prop, bool& Continue);
//#endif
public:
virtual void __fastcall ExecuteVerb(int Index);
virtual AnsiString __fastcall GetVerb(int Index);
virtual int __fastcall GetVerbCount(void);
#if (__BORLANDC__ < 0x0560)
__fastcall virtual TEditor(TComponent* AComponent, _di_IDesigner ADesigner);
__fastcall virtual ~TEditor(void);
#endif
};
#if (__BORLANDC__ < 0x0560)
__fastcall TEditor::TEditor(TComponent* AComponent, _di_IDesigner ADesigner)
: TDefaultEditor(AComponent, ADesigner) { }
__fastcall TEditor::~TEditor(void) { }
#endif
//#if (__BORLANDC__ < 0x0560)
void __fastcall TEditor::EditProperty(const _di_IProperty Prop, bool& Continue)
{
String PropName(Prop->GetName());
if (strcmpi(PropName.c_str(),"ANGLES") == 0){
Prop->Edit();
Continue = false;
}
}
//#endif
int __fastcall TEditor::GetVerbCount()
{
return 1;
}
String __fastcall TEditor::GetVerb(Integer Index)
{
/* if (Index == 0)
return loadString(EditAngle_RC);
else
return String("");*/
String Name="";
/*
switch(Index){
case 0:
Name = "About ..."; // This is default to dbl-click
break;
case 1:
Name = "Edit NcCommunication";
break;
default:
break;
}*/
return Name;
}
void __fastcall TEditor::ExecuteVerb(Integer Index)
{
//if (Index == 0) Edit();
switch(Index){
case 0:
((TEdit?? *)Component)->Edit(); //your edit
break;
default:
break;
}
}
#7
1add
#include <DesignIntf.hpp>
#include <DesignEditors.hpp>
#include <VCLEditors.hpp>
#include <RTLConsts.hpp>
2 add bpi
designide.bpi to ur's project 's Requires node.
3使用bcb 源程序编译出来一下文件复制到$(bcb)\lib\obj
designconst.dcu
designconst.obj
designeditors.dcu
designeditors.obj
designintf.dcu
designintf.obj
designmenus.dcu
designmenus.obj
vcleditors.dcu
vcleditors.obj
4
toolsapi 什么的。我忘记了,你先调试看看。
#include <DesignIntf.hpp>
#include <DesignEditors.hpp>
#include <VCLEditors.hpp>
#include <RTLConsts.hpp>
2 add bpi
designide.bpi to ur's project 's Requires node.
3使用bcb 源程序编译出来一下文件复制到$(bcb)\lib\obj
designconst.dcu
designconst.obj
designeditors.dcu
designeditors.obj
designintf.dcu
designintf.obj
designmenus.dcu
designmenus.obj
vcleditors.dcu
vcleditors.obj
4
toolsapi 什么的。我忘记了,你先调试看看。
#8
namespace WaveReg--〉首字母大写以外的字母必须小写。Wavereg
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TMyWave)};
RegisterComponents("Samples", classes, 0);
RegisterComponentEditor(__classid(TMyWave),__classid(TEditor));
}
}
注册元件的代码!!
以上的都在一个设计包里面,元件的代码在运行包里面!!
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TMyWave)};
RegisterComponents("Samples", classes, 0);
RegisterComponentEditor(__classid(TMyWave),__classid(TEditor));
}
}
注册元件的代码!!
以上的都在一个设计包里面,元件的代码在运行包里面!!
#9
不行啊,而且根本就没有产生dcu文件啊!!
#10
你把上面指定的pas文件找到,加入一个工程一编译就生成dcu obj,
不过前提是你编译的时候提是你少了这些文件才需要阿,如果不要这些你可以不用作的。
不过前提是你编译的时候提是你少了这些文件才需要阿,如果不要这些你可以不用作的。
#11
好的,我试试!!