1. Please .. Could someone explain Mouse Trap Programme's Output .. What the sequence values mean ??
- Posted by Selgor Jun 09, 2010
- 1274 views
Hello,
I am wanting to know what the meaning of the output ....
{513,136,131,0,{{0,72,124,160,152,1,0,{513}}},17} is ? .
I hope I have it right above.
This is the programme from win32Lib Demo Mousetrap.exw.
In anticipation ,Thank You, .
Cheers.
Selgor.
without warning include win32lib.ew constant w = createEx( Window, "MouseTraps", 0, 100, 100, 400, 300, 0, 0 ) constant s = create(StatusBar, "", w, 0, 0, 0, 0, 0) constant PushButton2 = createEx( PushButton, "PushButton2", w, 72, 124, 88, 28, 0,0 ) constant Group3 = createEx( Group, "Group3", w, 248, 160, 148, 60, 0, 0 ) constant PushButton4 = createEx( PushButton, "PushButton4", Group3, 12, 16, 88, 28,0, 0 ) VOID = createMouseTrap(w,PushButton2) VOID = createMouseTrap(w,PushButton4) procedure MouseTrap(integer self, integer event, sequence params) ?params end procedure setHandler(w, w32HMouseTrap, routine_id("MouseTrap")) WinMain(-1, 0)
2. Re: Please .. Could someone explain Mouse Trap Programme's Output .. What the sequence values mean ??
- Posted by DerekParnell (admin) Jun 09, 2010
- 1238 views
Selgor said...
Hello,
I am wanting to know what the meaning of the output ....
{513,136,131,0,{{0,72,124,160,152,1,0,{513}}},17} is ? .
I hope I have it right above.
This is the programme from win32Lib Demo Mousetrap.exw.
In anticipation ,Thank You, .
Cheers.
Selgor.
without warning include win32lib.ew constant w = createEx( Window, "MouseTraps", 0, 100, 100, 400, 300, 0, 0 ) constant s = create(StatusBar, "", w, 0, 0, 0, 0, 0) constant PushButton2 = createEx( PushButton, "PushButton2", w, 72, 124, 88, 28, 0,0 ) constant Group3 = createEx( Group, "Group3", w, 248, 160, 148, 60, 0, 0 ) constant PushButton4 = createEx( PushButton, "PushButton4", Group3, 12, 16, 88, 28,0, 0 ) VOID = createMouseTrap(w,PushButton2) VOID = createMouseTrap(w,PushButton4) procedure MouseTrap(integer self, integer event, sequence params) ?params end procedure setHandler(w, w32HMouseTrap, routine_id("MouseTrap")) WinMain(-1, 0)
Ok, here is what all that means (which is documented by the way).
Returned value | Meaning |
---|---|
513 | The mouse event code that triggered this. (LeftDown) |
136 | The X pixel position of the pointer |
131 | The Y pixel position of the pointer |
0 | (only applies to MouseMove events) |
{{0,72,124,160,152,1,0,{513}}} | The trap data (see below) |
17 | The ID of the control that received the mouse event |
The trap data is ...
Value | Meaning |
---|---|
0 | The Z-Order of overlapping trap areas. 0 means this is the topmost area. |
72 | The left edge of the trap area |
124 | The top edge of the trap area |
160 | The right edge of the trap area |
152 | The bottom edge of the trap area |
1 | The ID of the trap area. This is what is returned when you create a mousetrap |
0 | The user data associated with this trap area. See setTagMouseTrap() for details. |
{513} | The list of mouse events that can trigger a trap event for this area. See filterMouseTrap() for details |