Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  The third consideration to take into account when programming for
  the mouse is the fact the the mouse moves. You must be able to
  determine the direction, and sometimes the speed of the mouse
  roller ball movement. Mouse movement is determined by the mickey
  count. A mickey is a unit of measurement to determine how fast,
  and in what direction the mouse is moving. One mickey is
  approximately 1/200th of an inch. A ratio of mickeys to screen
  pixels is established to determine how far the user will have to
  move the mouse across the desktop before the mouse cursor is
  moved. There are two mickey count settings. One for horizontal
  mouse movement and one for vertical mouse movement. These are
  known as the horizontal mickey count and the vertical mickey
  count.

  The number of pixels that the mouse cursor moves across the
  screen does not have to correspond one to one with the number of
  mickeys the track ball rolls. You can define the sensitivity of
  the mouse by using the function m_mickeys(). The mickey count can
  be anywhere from 1 to 32767. The m_mickeys() functions takes two
  parameters: The horizontal mickey count and the vertical mickey
  count. Both parameters have to be supplied. If you were to pass a
  horizontal and vertical mickey count of 8 to the m_mickeys()
  function, the sensitivity of the mouse will be 8 mickeys to eight
  pixels. Since each character is normally 8 pixels wide, you will
  have to move the mouse 8 mickeys to advance the cursor one
  character on the screen. Likewise, if the mickey count is set to
  4, then the mouse sensitivity is 4 mickeys to 8 pixels and you
  will only have to move the mouse 4 mickeys to move the cursor one
  character. You must take into consideration that in different
  screen modes the resolution of the characters change. A 43 row
  screen has different character sizes than an 25 row screen.

  FUNCky also provides the capability of finding out which way, or
  how fast the mouse is moving. Three functions assist you in
  determining movement. The function m_movement() returns an
  integer that correspond to the mouse movement where a return of 0
  signifies no movement, a 1 signifies movement to the top of the
  screen, a 2 signifies movement to the right, a 3 signifies
  movement to the bottom of the screen and a 4 signifies movement
  to the left.

  Two other functions can help you determine how fast the mouse is
  moving. The m_hmickeys() functions returns a number that
  corresponds to the number of mickeys the mouse has moved
  horizontally since the last time you called m_hmickeys(). If no
  horizontal movement is present, the return value is 0. If the
  user is moving to the left, a negative number is returned. The
  lower the value of this number, the faster the mouse is moving.
  If the user is moving to the right, a positive number is
  returned. The greater this number, the faster the user is moving
  the mouse.

  A companion function called m_vmickeys() determines the speed and
  direction of vertical movement. If no vertical movement is
  present, then m_vmickeys() returns a 0. If movement to the top of
  the screen is detected, a negative number is returned. The lower
  the number, the faster the mouse is moving. If the user is moving
  towards the bottom of the screen, then a positive number is
  returned. The greater the number, the faster the mouse is moving.
  These functions make it very easy for you to take advantage of
  mouse movement.

See Also: m_vmickeys() m_hmickeys() m_mickeys() m_movement()

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