Win32lib problem
I'm making a programming editor with win32lib. I found a problem and
simplified the program so that this program recreates the error. When you
click on the child window, Eu shows the result of getMouseRelPos(). The
problem is, when you click the top-left pixel of the child window,
getMouseRelPos( child ) should return {1,1}; instead, it returns {1,-29}.
It seems that for the Y position, it returns the correct answer minus the
width of the toolbar.
--source code
without warning
include Win32Lib.ew
constant win = create( Window, "win", 0, Default, Default, 300, 300, 0 ),
tb = create( ToolBar, "", win, 0, 0, 0, 30, 0 ),
child = create( Window, "", win, 50, 50, 100, 100, {WS_CHILD,
WS_VISIBLE, WS_BORDER} )
procedure click( integer self, integer event, sequence parms )
? getPointerRelPos( child )
end procedure
setHandler( child, w32HClick, routine_id("click") )
WinMain( win, Normal )
--end source code
Is this a win32lib bug?
Thanks,
Phil
|
Not Categorized, Please Help
|
|