Вверх ↑
Ответов: 1291
Рейтинг: 47
#1: 2013-08-30 16:31:05 ЛС | профиль | цитата
Чето у меня компонент не заработал. Просто калькулятор запускается а форма исчезает. А ИК - ок, спасибо. Теперь появится новая фича в моей программе.
------------ Дoбавленo в 16.31:
Dock & UnDock Window:

Add(MainForm,3565278,581,231)
{
Point(Handle)
link(onCreate,10332811:doEvent1,[])
}
Add(InlineCode,2733908,889,245)
{
WorkPoints=#11:doSetParent|
EventPoints=#11:onSetParent|7:onError|
VarPoints=#9:OldParent|
DataPoints=#6:Parent|6:Handle|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|29:uses kol,Share,Debug,Windows;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|24: FOldParent: integer;|9: public|48: Parent,Handle,onSetParent,onError:THI_Event;|3: |50: procedure doSetParent(var dt:TData; idx:WORD);|53: procedure OldParent(var _Data:TData; Index:word);|5: end;|0:|14:implementation|0:|34:procedure THiAsmClass.doSetParent;|13:var p,h:HWND;|5:begin|27: p:=ReadInteger(dt,Parent);|27: h:=ReadInteger(dt,Handle);|17: FOldParent := 0;|36: if (p <> 0) and (h <> 0) then begin|29: FOldParent :=SetParent(h,p);|5: end;|1: |26: if FOldParent <> 0 then|39: _hi_onEvent(onSetParent,FOldParent)|6: else|34: _hi_onEvent( onError,'error');|1: |4:end;|0:|61:procedure THiAsmClass.OldParent(var _Data:TData; Index:word);|5:begin|30: _data.data_type := data_int;|28: _data.idata := FOldParent;|33:// dtInteger(_Data, FOldParent);|4:end;|0:|4:end.|
link(Parent,3565278:Handle,[(895,233)(741,233)(741,275)(587,275)])
link(Handle,5775991:Var3,[(902,233)])
}
Add(WinEnum,1218438,714,245)
{
link(onFindWindow,560410:doEvent1,[])
link(Caption,8438217:Text,[])
}
Add(VisualStrings,8438217,714,168)
{
Lines=#11:Калькулятор|
Width=123
Height=32
}
Add(Hub,10332811,623,245)
{
link(onEvent1,955090:doExec,[])
link(onEvent2,1218438:doFind,[])
}
Add(WinExec,955090,651,245)
{
FileName="Calc.Exe"
}
Add(Hub,560410,777,245)
{
InCount=2
OutCount=3
link(onEvent1,2733908:doSetParent,[])
link(onEvent2,1783027:doLeft,[])
link(onEvent3,1783027:doTop,[])
}
Add(PosWindow,1783027,819,252)
{
link(Handle,5775991:Var2,[])
}
Add(GetDataEx,5775991,819,228)
{
Angle=3
link(Data,15802178:Var3,[(745,233)(745,289)])
}
Add(Button,7476512,350,245)
{
Left=35
Top=15
Caption="Dock"
link(onClick,560410:doEvent2,[(580,251)(580,258)])
}
Add(Button,14115646,351,331)
{
Left=110
Top=15
Caption="UnDock"
link(onClick,15882441:doSetParent,[(499,337)(499,342)])
}
Add(InlineCode,15882441,616,336)
{
WorkPoints=#11:doSetParent|
EventPoints=#11:onSetParent|7:onError|
VarPoints=#9:OldParent|
DataPoints=#6:Parent|6:Handle|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|29:uses kol,Share,Debug,Windows;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|24: FOldParent: integer;|9: public|48: Parent,Handle,onSetParent,onError:THI_Event;|3: |50: procedure doSetParent(var dt:TData; idx:WORD);|53: procedure OldParent(var _Data:TData; Index:word);|5: end;|0:|14:implementation|0:|34:procedure THiAsmClass.doSetParent;|13:var p,h:HWND;|5:begin|27: p:=ReadInteger(dt,Parent);|27: h:=ReadInteger(dt,Handle);|17: FOldParent := 0;|36: if (p <> 0) and (h <> 0) then begin|29: FOldParent :=SetParent(h,p);|5: end;|1: |26: if FOldParent <> 0 then|39: _hi_onEvent(onSetParent,FOldParent)|6: else|34: _hi_onEvent( onError,'error');|1: |4:end;|0:|61:procedure THiAsmClass.OldParent(var _Data:TData; Index:word);|5:begin|30: _data.data_type := data_int;|28: _data.idata := FOldParent;|33:// dtInteger(_Data, FOldParent);|4:end;|0:|4:end.|
link(Parent,2733908:OldParent,[(622,306)(895,306)])
link(Handle,15802178:Var2,[(629,314)(727,314)])
}
Add(GetDataEx,15802178,721,284)
{
Angle=3
link(Data,1218438:Handle,[(720,289)])
}



карма: 3
Hiasm + Flowstone + CopperCube + GoDot + JS
0