Вверх ↑
Ответов: 1925
Рейтинг: 172
#1: 2017-08-13 10:49:34 ЛС | профиль | цитата
Костылём решил проблему и для onMouseUp:

Add(StringTableMT,9242582,196,77)
{
Width=392
Height=268
Align=5
Columns=#4:Файл|8:Дата===2|
ColumnClick=1
IconsCheck=[]
MiscIcons=[]
Icons=[]
StringsStrLst=#3:1;2|3:3;4|3:5;6|
AutoTblStrLst=0
Point(doSort)
Point(doAutoColWidth)
Point(Strings)
Point(Matrix)
Point(onMouseDown)
link(onMouseDown,14153017:doWork1,[])
}
Add(PopupMenu,12652589,315,84)
{
Menu=#25:Переименовать все по дате|
}
Add(MultiElement,14153017,259,84)
{
@Hint=#35:"Переделывает" нажатие в отпускание|
link(onEvent1,12652589:doPopupHere,[])
}
BEGIN_SDK
Add(EditMulti,5038441,21,21)
{
EventCount=1
WorkCount=1
link(doWork1,10762547:doEvent,[(49,27)(49,83)])
}
Add(InlineCode,10339731,77,126)
{
@Hint=#24:Глобальный перехват мыши|
EventPoints=#11:onMouseMove|13:onLButtonDown|11:onLButtonUp|13:onRButtonDown|11:onRButtonUp|11:onWheelDown|9:onWheelUp|8:onScroll|14:onX1ButtonDown|11:onX1BttonUp|14:onX2ButtonDown|11:onX2BttonUp|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|38:uses kol,Share,Debug,windows,messages;|0:|4:type|27: tagMSLLHOOKSTRUCT = record|12: pt:TPoint;|18: mouseData:dword;|14: flags:dword;|13: time:dword;|23: dwExtraInfo:^Cardinal|5: end;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|26: onMouseMove:THI_Event;|28: onLButtonDown:THI_Event;|26: onLButtonUp:THI_Event;|28: onRButtonDown:THI_Event;|26: onRButtonUp:THI_Event;|26: onWheelDown:THI_Event;|24: onWheelUp:THI_Event;|23: onScroll:THI_Event;|29: onX1ButtonDown:THI_Event;|27: onX1ButtonUp:THI_Event;|29: onX2ButtonDown:THI_Event;|27: onX2ButtonUp:THI_Event;|0:|23: constructor Create;|33: destructor Destroy; override;|0:|5: end;|0:|14:var H:THandle;|20: hac:THiAsmClass;|0:|14:implementation|0:|49:function hook(code,w,l:integer):Lresult; stdcall;|15:var str:string;|25: ll:tagMSLLHOOKSTRUCT;|15: d:LongWord;|5:begin|38: ll := tagMSLLHOOKSTRUCT(pointer(l)^);|0:|26: d := ll.mouseData shr 16;|46: if d and $8000 <> 0 then d := d or $FFFF0000;|0:|42: //str := Int2Str(w)+ ' ' + Int2Str(d);|10: case w of|36: 512: _hi_OnEvent(hac.onMouseMove);|38: 513: _hi_OnEvent(hac.onLButtonDown);|36: 514: _hi_OnEvent(hac.onLButtonUp);|38: 516: _hi_OnEvent(hac.onRButtonDown);|36: 517: _hi_OnEvent(hac.onRButtonUp);|36: 519: _hi_OnEvent(hac.onWheelDown);|34: 520: _hi_OnEvent(hac.onWheelUp);|45: 522: _hi_OnEvent(hac.onScroll, int2str(d));|12: 523: begin|17: case d of|44: 1: _hi_OnEvent(hac.onX1ButtonDown);|44: 2: _hi_OnEvent(hac.onX2ButtonDown);|12: end;|11: end;|12: 524: begin|17: case d of|42: 1: _hi_OnEvent(hac.onX1ButtonUp);|42: 2: _hi_OnEvent(hac.onX2ButtonUp);|12: end;|11: end;|5: end;|27: //_hi_OnEvent(hac.ev,str);|38: result := CallNextHookEx(H,code,w,l);|4:end;|0:|31:constructor THiAsmClass.Create;|5:begin|18: inherited Create;|13: hac := self;|48: H := SetWindowsHookEx(14, @hook, hInstance, 0);|82: if H = 0 then messagebox(ReadHandle,'Ошибка перехвата мыши','ERROR',mb_iconhand);|4:end;|0:|31:destructor THiAsmClass.Destroy;|5:begin|24: UnhookWindowsHookEx(H);|19: inherited Destroy;|4:end;|0:|4:end.|
link(onRButtonUp,1073831:doEvent,[])
}
Add(Switch,9179949,154,70)
{
DataOn=Integer(1)
DataOff=Integer(0)
Point(doOn)
Point(State)
}
Add(IndexToChanel,1073831,154,154)
{
Point(Index)
link(onEvent2,10167199:doEvent1,[])
link(Index,9179949:State,[])
}
Add(Hub,10167199,203,161)
{
link(onEvent1,4094970:doDeferredEvent,[])
link(onEvent2,9179949:doReset,[(229,174)(229,128)(142,128)(142,83)])
}
Add(DeferredEvent,4094970,245,161)
{
link(onDeferredEvent,5038441:onEvent1,[(299,167)(299,27)])
}
Add(IndexToChanel,10762547,77,77)
{
link(onEvent2,9179949:doOn,[])
}
END_SDK
карма: 9
0