Page 1 of 1
Full mouse functions in normal Window
Posted: Wed Jun 22, 2011 10:02 am
by coder14
PureBasic already has a powerful set of mouse functions in its built-in mouse library, but for some reason they are not accessible from normal windows. Is there any way around this, and call them from an OpenWindow instead of an OpenScreen? Or maybe from an implementation of OpenWindowedScreen?
Re: Full mouse functions in normal Window
Posted: Wed Jun 22, 2011 10:26 am
by ts-soft
WindowMouseX()
WindowMouseY() ?
Re: Full mouse functions in normal Window
Posted: Wed Jun 22, 2011 4:36 pm
by atomo
Re: Full mouse functions in normal Window
Posted: Wed Jun 22, 2011 7:03 pm
by coder14
PB's WindowMouseX/Y and click/doubleclick states are just not enough. Short of using API calls, we're left with OpenScreen/OpenWindowedScreen, and they use DirectX.
And atomo, your mouse include file is really great, but it entirely depends on the GetAsyncKeyState API function. I believe it works only in Windows. But the CanvasGadget is news to me. If it includes all the mouse events/states, it could be a real solution. Thanks for the info!
Re: Full mouse functions in normal Window
Posted: Thu Jun 23, 2011 5:45 am
by coder14
Thank you atomo. CanvasGadget is the answer - full mouse handling, keyboard focus and persistent graphics. Any idea on when the final release of PB4.6 will be available?
OFF-TOPIC: Since compilers only "translate" the functions that we use in our code, is it fair to say that buggy functions that are not called would not affect our projects? If CanvasGadget works well, would there be any reason not to use the beta version to build our project releases?
Re: Full mouse functions in normal Window
Posted: Thu Jun 23, 2011 11:38 am
by PureLust
Hi coder14,
if you are looking for full Mouse-Event Support for all Gadgets, you may have a look at
atomos 'MouseEvent-Include.
Greetz, PL.
Re: Full mouse functions in normal Window
Posted: Thu Jun 23, 2011 1:51 pm
by coder14
PureLust wrote:if you are looking for full Mouse-Event Support for all Gadgets, you may have a look at
atomos 'MouseEvent-Include.
coder14 wrote:And atomo, your mouse include file is really great, but it entirely depends on the GetAsyncKeyState API function. I believe it works only in Windows.
Thanks PL - appreciate the pointer.