Вот шаблон:
Add(MainForm,13523519,140,63)
{
Left=20
Top=105
Position=1
}
Add(ChildScrollBox,6760295,329,63)
{
}
BEGIN_SDK
Add(EditMulti,3978996,21,21)
{
WorkCount=1
Width=440
Height=193
link(doWork1,10754446:doEvent1,[(46,27)(46,48)])
}
Add(ScrollBox,10924359,378,49)
{
Left=5
Top=30
Width=380
Height=240
Point(Handle)
}
Add(Image,5274948,189,42)
{
ViewStyle=4
Point(doWidth)
Point(doHeight)
Point(ImageWidth)
Point(ImageHeight)
Point(doRefresh)
Point(onMouseDown)
Point(onMouseUp)
Point(onMouseMove)
Point(MouseX)
link(onMouseDown,15643609:doWork1,[])
link(onMouseUp,15643609:doWork2,[])
link(onMouseMove,15084132:doCompare,[(242,69)(242,104)])
}
Add(Hub,10754446,56,42)
{
OutCount=3
link(onEvent1,5274948:doLoad,[])
link(onEvent2,950310:doData,[(95,55)(95,125)])
link(onEvent3,13900580:doData,[(88,62)(88,174)])
}
Add(DoData,950310,105,119)
{
link(onEventData,5274948:doWidth,[(172,125)(172,62)])
link(Data,5274948:ImageWidth,[(111,110)(202,110)])
}
Add(DoData,13900580,105,168)
{
link(onEventData,5274948:doHeight,[(179,174)(179,69)])
link(Data,5274948:ImageHeight,[(111,159)(209,159)])
}
Add(Memory,1682134,308,49)
{
Default=Integer(1)
}
Add(ChanelToIndex,15643609,252,49)
{
link(onIndex,1682134:doValue,[])
}
Add(InlineCode,11042059,392,91)
{
WorkPoints=#7:HScroll|7:VScroll|
VarPoints=#4:HPos|4:VPos|
DataPoints=#3:Wnd|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|38:uses Messages,Windows,kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|17: wnd:THI_Event;|50: procedure HScroll(var _Data:TData; Index:word);|50: procedure VScroll(var _Data:TData; Index:word);|47: procedure HPos(var _Data:TData; Index:word);|47: procedure VPos(var _Data:TData; Index:word);|5: end;|0:|14:implementation|0:|30:procedure THiAsmClass.HScroll;|11:var h:HWND;|16: Pos:integer;|31: lpMinPos,lpMaxPos: Integer;|5:begin|28: h := ToIntegerEvent(Wnd);|27: Pos := ToInteger(_Data);|51: GetScrollRange( h, SB_HORZ, lpMinPos, lpMaxPos);|42: if Pos > lpMaxPos then Pos := lpMaxPos;|45: if Pos < lpMinPos then Pos := lpMinPos; |39: SetScrollPos(h, SB_HORZ, Pos, True);|37: SendMessage(h, WM_HSCROLL, -1, 0);|4:end;|0:|30:procedure THiAsmClass.VScroll;|11:var h:HWND;|16: Pos:integer;|31: lpMinPos,lpMaxPos: Integer;|5:begin|28: h := ToIntegerEvent(Wnd);|27: Pos := ToInteger(_Data);|51: GetScrollRange( h, SB_VERT, lpMinPos, lpMaxPos);|42: if Pos > lpMaxPos then Pos := lpMaxPos;|45: if Pos < lpMinPos then Pos := lpMinPos; |39: SetScrollPos(h, SB_VERT, Pos, True);|37: SendMessage(h, WM_VSCROLL, -1, 0);|4:end;|0:|27:procedure THiAsmClass.HPos;|20:var SI: TScrollInfo;|5:begin|27: SI.cbSize := Sizeof(SI);|23: SI.fMask := SIF_POS;|51: GetScrollInfo(ToIntegerEvent(Wnd), SB_HORZ, SI);|28: dtInteger(_Data,SI.nPos);|4:end;|0:|27:procedure THiAsmClass.VPos;|20:var SI: TScrollInfo;|5:begin|27: SI.cbSize := Sizeof(SI);|23: SI.fMask := SIF_POS;|51: GetScrollInfo(ToIntegerEvent(Wnd), SB_VERT, SI);|28: dtInteger(_Data,SI.nPos);|4:end;|0:|0:|4:end.|
link(Wnd,10924359:Handle,[])
}
Add(If_else,15084132,301,98)
{
Op1=Integer(1)
link(Op2,1682134:Value,[])
}
END_SDK
Add(ODialog,8946635,238,63)
{
link(onExecute,11585814:doLoad,[])
}
Add(PictureStream,11585814,280,63)
{
link(onLoad,6760295:doWork1,[])
}
Add(Button,8407419,196,63)
{
Left=5
Top=5
Width=65
Ctl3D=0
Caption="Открыть"
link(onClick,8946635:doExecute,[])
}