Win32Lib: WheelMove in Child Window
- Posted by cklester <cklester at yahoo.com> Aug 06, 2004
- 358 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/