·一周点击排行
·热点推荐
您的位置:首页 >> 计算机 » 等级考试 » BCB中派生VCL类及动态地创建控件 >> 正文

BCB中派生VCL类及动态地创建控件

发布时间:2007-11-1 14:56:00 浏览次数: 504

以下不完整例子为生成一个tmemo的派生类及动态地创建该vcl控件。 

class tmemoex : public tmemo 




extern tmemoex memoex; 

class tform1 : class tform 

public: 
tmemoex *memoex; 




void _fastcall tform1::formshow(tobject *sender) 

memoex=new tmemoex(this); 
memoex->parent=this; 



总之,遵循以下步骤即可: 
类定义; 
extern tmemoex memoex; 
tmemoex *memoex; 
memoex=new tmemoex(this); 
memoex->parent=this


讨论此主题请进>>: BCB中派生VCL类及动态地创建控件