Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - mousesave() save mouse state http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 mousesave()         Save mouse state
------------------------------------------------------------------------------
 Declaration
   mouse.hdr

 Syntax
   func ulong mousesave extern

 Arguments
   None.

 Return
   A pointer to the saved mouse state buffer.

 Description
   The mousesave() function saves the current mouse driver state into an
   internal buffer and returns a pointer to this buffer. This pointer
   can be passed to mouserestore() to restore the saved environment.

   mousesave() and mouserestore() may only used if the currently installed
   mouse driver is fully compatible with the Microsoft mouse driver. The
   state of the mouse driver is saved, not the mouse ccordinates. Use this
   pair of functions to save mouse information before relinquishing control
   to another program's mouse handler.

 Example
   #define EXAMPLE_MOUSE
   #include example.hdr

   proc Test_mousesave
   vardef
      ulong pMouseState
   enddef
   if mouseavail()
      clear
      mouseon()
      pMouseState := mousesave()
      // here run external program that installs a different mouse handler
      mouserestore( pMouseState )
   else
      ? "Mouse is not available"
   endif
   endproc

   proc main
   Test_mousesave()
   endproc

See Also: mouserestore()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson