高手帮忙呀,非常急,是关于控件的属性编辑器的问题,有点难度,CB5和CB6竟然不一样(77分)

P

pzoon

Unregistered / Unconfirmed
GUEST, unregistred user!
//---------------------------------------------------------------------------
#ifndef DBGridErpH
#define DBGridErpH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Classes.hpp>
#include <Controls.hpp>
#include <DBGrids.hpp>
#include <Grids.hpp>
#include <Forms.hpp>
#include <UDBGridErpFrm.h>
#include <DsgnIntf.hpp>
//---------------------------------------------------------------------------
//编辑器专用
class TUnlFileNameProperty : public TStringProperty
{
public:
TPropertyAttributes __fastcall GetAttributes()
{
return TPropertyAttributes () << paDialog;
}
void __fastcall Edit() //User Click Show(用户单击了选择)
{
TUDBGridErpFrm* dlg = new TUDBGridErpFrm(Application);
dlg->FileName = GetValue();
//Return String value(返回一个字符串的值)
if (dlg->Execute())
{
Value = dlg->FileName;
//Where "Value"
}
delete dlg;
}
};
//----------------------
class TUnlBaudRateProperty : public TIntegerProperty
{
public:
TPropertyAttributes __fastcall GetAttributes();
{
return TPropertyAttributes () << paValueList;
}
void __fastcall GetValues(TGetStrProc Proc)
{
Proc("1200");
Proc("2400");
Proc("4800");
Proc("9600");
Proc("19200");
}
};
//------------------------
class TUnlAboutProperty : public TStringProperty
{
public:
TPropertyAttributes __fastcall GetAttributes()
{
return TPropertyAttributes () << paDialog << paReadOnly;
}
void __fastcall Edit() //User Click Show(用户单击了选择)
{
TUDBGridErpFrm *AboutBox = new TUDBGridErpFrm(Application);
AboutBox->ShowModal();
delete AboutBox;
}
};
//--------------------------
class TMenuAboutEditor : public TDefaultEditor
{
public:
/*
int __fastcall GetVerbCount()
{
return 3;
}
AnsiString __fastcall GetVerb(int Index)
{
AnsiString S;
switch (Index)
{
case 0: S = "&amp;About TurboPower";
break;
case 1: S = "TurboPower on the Web";
break;
case 2: S = "&amp;Designer";
break;
}
return S;
}
void __fastcall ExecuteVerb(int Index)
{
switch (Index)
{
case 0:
ShowMessage("制作About菜单失败!");
break;
case 1:
ShellExecute(Application->Handle, "open", "http://www.jx_wbo.com",
0, 0, SW_NORMAL);
break;
case 2:
ShowMessage("制作Designer菜单失败!");
break;
}
}
*/
};
//-------------------------------
class EInvaildBaudRate : public Exception
{
public:
//初始化
EInvaildBaudRate(const AnsiString Msg) : Exception(Msg)
{
}
};
//---------------------------------------------------------------------------
//以上是属性编辑器区域*******************************************************
//---------------------------------------------------------------------------
 
错误如下:
[C++ Error] DBGridErp.h(18): E2303 Type name expected
[C++ Error] DBGridErp.h(20): E2303 Type name expected
[C++ Error] DBGridErp.h(20): E2139 Declaration missing ;
[C++ Error] DBGridErp.h(34): E2040 Declaration terminated incorrectly
[C++ Error] DBGridErp.h(34): E2190 Unexpected }
[C++ Error] DBGridErp.h(34): E2190 Unexpected }
[C++ Error] DBGridErp.h(37): E2303 Type name expected
[C++ Error] DBGridErp.h(39): E2303 Type name expected
[C++ Error] DBGridErp.h(39): E2139 Declaration missing ;
[C++ Error] DBGridErp.h(40): E2040 Declaration terminated incorrectly
[C++ Error] DBGridErp.h(51): E2040 Declaration terminated incorrectly
[C++ Error] DBGridErp.h(51): E2190 Unexpected }
[C++ Error] DBGridErp.h(51): E2190 Unexpected }
[C++ Error] DBGridErp.h(54): E2303 Type name expected
[C++ Error] DBGridErp.h(56): E2303 Type name expected
[C++ Error] DBGridErp.h(56): E2139 Declaration missing ;
[C++ Error] DBGridErp.h(66): E2040 Declaration terminated incorrectly
[C++ Error] DBGridErp.h(66): E2190 Unexpected }
[C++ Error] DBGridErp.h(66): E2190 Unexpected }
[C++ Error] DBGridErp.h(69): E2303 Type name expected
 
编辑器注册的部分我还没有写,怎么就出现这么一大堆的错误,用CB5就没有错误,是怎么回事,CB6的属性编辑器应该怎么写呢?[:(]
 
来了不要走呀,帮忙看看呀
 
cb6好像不是用DsgnIntf.hpp这个头文件了,而是designintf.hpp
 
顶部