1. Win32Lib: WheelMove in Child Window
- Posted by cklester <cklester at yahoo.com> Aug 06, 2004
- 379 views
Run the code below and try to use your mousewheel over the child window. It should respond with a message box... but never gets there. include Win32Lib.ew without warning constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300, 0, 0 ) constant statbar = createEx( StatusBar, "StatusBar3", Window1, 0, 0, 0, 0, 0, 0 ) constant CWindow2 = createEx( Window, "CWindow2", Window1, 112, 76, 200, 100, or_all({WS_CHILD}), 0 ) openWindow(CWindow2, Normal) procedure CWindow2_onMouse (integer self, integer event, sequence params)--params is ( int event, int x, int y, int shift ) if params[1] = WheelMove then setText(statbar,"Moved!") else setText(statbar,sprintf("%d,%d,%d",{params[1],params[2],params[3]})) end if end procedure setHandler( CWindow2, w32HMouse, routine_id("CWindow2_onMouse")) WinMain( Window1,Normal ) -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
2. Re: Win32Lib: WheelMove in Child Window
- Posted by cklester <cklester at yahoo.com> Aug 06, 2004
- 372 views
cklester wrote: > > Run the code below and try to use your mousewheel over the child > window. It should respond with a message box... but never gets there. I meant it should respond with a message in the statusbar. :) Rob, I really need to be able to edit my messages after posting. :) -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
3. Re: Win32Lib: WheelMove in Child Window
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 06, 2004
- 377 views
cklester wrote: > > Run the code below and try to use your mousewheel over the child > window. It should respond with a message box... but never gets there. > > include Win32Lib.ew > without warning > constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300, > 0, 0 > ) > constant statbar = createEx( StatusBar, "StatusBar3", Window1, 0, 0, 0, 0, 0, > 0 ) > constant CWindow2 = createEx( Window, "CWindow2", Window1, 112, 76, 200, 100, > or_all({WS_CHILD}), > 0 ) > openWindow(CWindow2, Normal) > procedure CWindow2_onMouse (integer self, integer event, sequence > params)--params is > ( int event, int x, int y, int shift ) > if params[1] = WheelMove then > setText(statbar,"Moved!") > else > setText(statbar,sprintf("%d,%d,%d",{params[1],params[2],params[3]})) > end if > end procedure > setHandler( CWindow2, w32HMouse, routine_id("CWindow2_onMouse")) > WinMain( Window1,Normal ) I don't know why yet, but the wheel movement is being picked up by the parent window and not the child window. I'll work on this a bit more to find out why. -- Derek Parnell Melbourne, Australia