Event $203 & EventSource()

BlitzPlus Forums/BlitzPlus Programming/Event $203 & EventSource()

Eikon(Posted 2003) [#1]
I have multiple canvases on the screen and I want to have each one activate while the mouse is over it to be sure to catch all clicks. The MouseMove event $203 holds the the handle of the canvas the mouse is currently over. My code below doesnt write to debug so I know the case statements arent right. What handle does it need?

Canvas1 = CreateCanvas(0, 0, 320, 240, Parent)
hWnd_Canvas1 = QueryObject(Canvas1, 1) ; Get hWnd

Select WaitEvent()
     Case $203 ; Mouse Move
     Select EventSource() ; Canvas Handle
          Case hWnd_Canvas1
          Debuglog "Canvas1"
     End Select
End Select



soja(Posted 2003) [#2]
Canvas1. You don't need the Windows' handle to the gadget.

Just change
Case hWnd_Canvas1
to
Case Canvas1



Eikon(Posted 2003) [#3]
Hmm... im sure I tryed that. Anyway, it worked this time :)

Thanks.