Trapping Wheel Mouse Roll Event -- An Esoteric Question

Discussion in 'AutoCAD' started by matt_1ca, Mar 24, 2005.

  1. matt_1ca

    matt_1ca Guest

    Is there a way for me to trap the event triggered when I roll the wheel of an optical wheel mouse?
    Right now I am designing a program that is supposed to perform certain actions when the user rolls
    the wheel of his mouse e.g. when zooming in or out of an AutoCAD drawing.

    In AutoCAD it does not display anything in the command prompt when user rolls the wheel -- so it
    is not actually an ordinary zoom -- it is something else .. zooming that is generated from a rolling
    of the wheel is really a strange kind of zoom to me -- that I do not have an idea how to trap,
    and yet I have to trap.

    All kinds of ordinary zoom require somekind of click or drag using the mouse buttons accompanied
    by a movement of the mouse itself -- but a zoom from a wheel of a mouse does not need any movement of the mouse at all -- it does not even require the user to click on any button -- it is
    pure rolling of the wheel -- moreover, unlike ordinary zoom which sends something to the command
    line (allowing user to simulate or trap it through code) a zooming accomplished by rolling the wheel
    does not send anything in the command line at all.

    Does anyone have an idea how it can be trapped? Any suggestion welcome.

    Matt
     
    matt_1ca, Mar 24, 2005
    #1
  2. winAPI...now we're programming..;0
    google will give you more than you want. gl
     
    Paul Richardson, Mar 25, 2005
    #2
  3. Matt,
    I use mouse.cls that came with the
    book, VBA Developers Handbook.
    Nice way to learn the api functions and
    there in a useable class. Might
    want to check it out.
    gl,
    Paul
     
    Paul Richardson, Mar 25, 2005
    #3
  4. there in a useable class. Might
    they're....I hate doing that..;-)
     
    Paul Richardson, Mar 25, 2005
    #4
  5. matt_1ca

    Lanny Guest

    You could check against the 'VIEWSIZE' & 'VIEWCTR' variables -- if they change you can revert to values you want.
    HTH. - Lanny
     
    Lanny, Mar 25, 2005
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.