1. Win32Lib: WheelMove in Child Window

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/

new topic     » topic index » view message » categorize

2. Re: Win32Lib: WheelMove in Child Window

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/

new topic     » goto parent     » topic index » view message » categorize

3. Re: Win32Lib: WheelMove in Child Window

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu