使用过ifps3的高手们帮帮忙! (100分)

  • 主题发起人 主题发起人 jlutt-sadan
  • 开始时间 开始时间
J

jlutt-sadan

Unregistered / Unconfirmed
GUEST, unregistred user!
初次使用ifps3,请高手们帮帮忙!
我现在想知道该怎么样往ifps3中注册控件,比如TListView,
在ifps3中注册控件应该注意哪些问题?向高手请教!谢谢!
下面是我注册 编译期 CustomImageList 的单元 不知道该怎么注册 运行期的
unit ifpii_ImageList;
{$I ifps3_def.inc}

interface
uses
ifpscomp, ifps3common, ifps3utl, ifpiclass;

procedure SIRegister_ImageList_TypesAndConsts(Cl: TIFPSCompileTimeClassesImporter);
procedure SIRegisterChangeLink(Cl: TIFPSCompileTimeClassesImporter);
procedure SIRegisterCustomImageList(Cl: TIFPSCompileTimeClassesImporter);

procedure SIRegister_ImageLists(Cl: TIFPSCompileTimeClassesImporter);

implementation
uses
ImgList,Controls;

procedure SIRegister_ImageList_TypesAndConsts(Cl: TIFPSCompileTimeClassesImporter);
begin
Cl.SE.AddTypeS('TDrawingStyle','(dsFocus, dsSelected, dsNormal, dsTransparent)');
Cl.SE.AddTypeS('TImageType','(itImage,itMask)');
Cl.SE.AddTypeS('TResType','(rtBitmap,rtCursor,rtIcon)');
Cl.SE.AddTypeS('TOverlay','0..3');
Cl.SE.AddTypeS('TLoadResource','(lrDefaultColor, lrDefaultSize, lrFromFile,lrMap3DColors, lrTransparent, lrMonoChrome)');
Cl.SE.AddTypeS('TLoadResources','set of TLoadResource');
Cl.SE.AddTypeS('TImageIndex','integer');
end;

procedure SIRegisterChangeLink(Cl: TIFPSCompileTimeClassesImporter);
begin
with Cl.Add(Cl.FindClass('TOBJECT'),TChangeLink) do begin
RegisterMethod('destructor Destroy');
RegisterProperty('OnChange','TNotifyEvent',iptRW);
RegisterProperty('Sender','TCustomImageList',iptRW);
end;
end;

procedure SIRegisterCustomImageList(Cl: TIFPSCompileTimeClassesImporter);
begin
with Cl.Add(Cl.FindClass('TComponent'),TCustomImageList) do begin
RegisterMethod('constructor Create(AOwner: TComponent);orerride;');
RegisterMethod('constructor CreateSize(AWidth, AHeight: Integer);');
RegisterMethod('destructor Destroy;override;');
RegisterMethod('procedure Assign(Source: TPersistent);override;');
RegisterMethod('function Add(Image, Mask: TBitmap): Integer;');
RegisterMethod('function AddIcon(Image: TIcon): Integer;');
RegisterMethod('procedure AddImages(Value: TCustomImageList);');
RegisterMethod('function AddMasked(Image: TBitmap
MaskColor: TColor): Integer;');
RegisterMethod('procedure Clear;');
RegisterMethod('procedure Delete(Index: Integer);');
RegisterMethod('procedure Draw(Canvas: TCanvas
X, Y, Index: Integer
Enabled: Boolean=True);');
RegisterMethod('procedure DrawOverlay(Canvas: TCanvas
X, Y: Integer;ImageIndex: Integer
Overlay: TOverlay
Enabled: Boolean=True);');
RegisterMethod('function FileLoad(ResType: TResType
Name: string;MaskColor: TColor): Boolean;');
RegisterMethod('procedure GetBitmap(Index: Integer
Image: TBitmap);');
RegisterMethod('function GetHotSpot: TPoint
virtual;');
RegisterMethod('procedure GetIcon(Index: Integer
Image: TIcon);');
RegisterMethod('function GetImageBitmap: HBITMAP;');
RegisterMethod('function GetMaskBitmap: HBITMAP;');
RegisterMethod('function GetResource(ResType: TResType
Name: string;Width: Integer
LoadFlags: TLoadResources
MaskColor: TColor): Boolean;');
RegisterMethod('function GetInstRes(Instance: THandle
ResType: TResType
Name: string;Width: Integer
LoadFlags: TLoadResources
MaskColor: TColor): Boolean;');
RegisterMethod('function HandleAllocated: Boolean;');
RegisterMethod('procedure Insert(Index: Integer
Image, Mask: TBitmap);');
RegisterMethod('procedure InsertIcon(Index: Integer
Image: TIcon);');
RegisterMethod('procedure InsertMasked(Index: Integer
Image: TBitmap
MaskColor: TColor);');
RegisterMethod('procedure Move(CurIndex, NewIndex: Integer);');
RegisterMethod('function Overlay(ImageIndex: Integer
Overlay: TOverlay): Boolean;');
RegisterMethod('procedure RegisterChanges(Value: TChangeLink);');
RegisterMethod('function ResourceLoad(ResType: TResType
Name: string;MaskColor: TColor): Boolean;');
RegisterMethod('function ResInstLoad(Instance: THandle
ResType: TResType
Name: string;MaskColor: TColor): Boolean;');
RegisterMethod('procedure Replace(Index: Integer
Image, Mask: TBitmap);');
RegisterMethod('procedure ReplaceIcon(Index: Integer
Image: TIcon);');
RegisterMethod('procedure ReplaceMasked(Index: Integer
NewImage: TBitmap
MaskColor: TColor);');
RegisterMethod('procedure UnRegisterChanges(Value: TChangeLink);');
RegisterProperty('AllocBy','Integer',iptRW);
RegisterProperty('BlendColor','TColor',iptRW);
RegisterProperty('BkColor','TColor',iptRW);
RegisterProperty('DrawingStyle','TDrawingStyle',iptRW);
RegisterProperty('Height','Integer',iptRW);
RegisterProperty('ImageType','TImageType',iptRW);
RegisterProperty('Masked','Boolean',iptRW);
RegisterProperty('ShareImages','Boolean',iptRW);
RegisterProperty('Width','Integer',iptRW);
RegisterProperty('OnChange','TNotifyEvent',iptRW);
end;
end;

procedure SIRegister_ImageLists(Cl: TIFPSCompileTimeClassesImporter);
begin
SIRegister_ImageList_TypesAndConsts(Cl);
SIRegisterChangeLink(Cl);
SIRegisterCustomImageList(Cl);
end;
 
唉 怎么没人回答呢?
 
我把它用在我的游戏里作为脚本引擎,有点大材小用[:D]
http://kuga.51.net/kuga/index.htm
 
请问能简单介绍一下IFPS3是什么冬冬吗?
 
ifps3 是一个pascal的脚步语言,详细的我到单位了在给你copy出来
功能挺多的(家里面上不了国外的网站 唉)
 

经你提醒
我也找到了一些它的资料

挺好的

要认真看看

谢谢你讲解
 
如果我想定义自己的写的控件呢?
不知道能不能把我程序中的一个窗体注册了?
 
后退
顶部