- Horizontal Scrolling
- Posted by doublemaster007@gmail.com on May 24th, 2008
Hi
I want to support horizontal scrolling for HID mouse. which has a
additional button for Horizontal scrolling (XP, Vista). Can any one
please suggest me how i should go about?
Do i need to write a filter driver ? is it upper filter or lower?
Is there any sample that i should look??
Is it possible to write in user mode or kernal level is the only way?
Regards
Muh
- Posted by doublemaster007@gmail.com on May 27th, 2008
No replies yet??
((
http://groups.google.com/group/micro...bb8264 4b8fac
Doron Holan [MSFT] post says..
1) that the msft mouse is exposing horizontal scroll as a separate
HID top
level collection (TLC) and that there is a UM service reading this TLC
and
converting into scrolling window messages
My Question is how to implement this UM service? What the service
should be doing?? Is there any examples of this kind?
After searching extensively i could only find some document regarding
vista and H.Scrolling but nothing about XP.. Please help me.. i am
exhausted!
doublemaster007@gmail.com wrote:
- Posted by Ray Trent on May 27th, 2008
download.microsoft.com/download/a/f/7/af7777e5-7dcd-4800-8a0a-b18336565f5b/Wheel.docx
Describes how to do this in Vista with a HID device.
No earlier operating system has built in horizontal scrolling
functionality, so in order to do horizontal scrolling in those OS's
you'll have to have a user-mode app that opens a separate
top-level-collection in the device, reads out the horizontal wheel
messages, and then horizontally scrolls applications itself.
Since there's no defined interface to do this, you'll have to figure out
how to do it yourself. It's unlikely than anyone that has an existing
solution to this problem will give it to you, because it's typically
going to be a trade secret that they developed with considerable effort.
But you could start by playing with WM_HSCROLL messages.
doublemaster007@gmail.com wrote:
--
Ray
- Posted by doublemaster007@gmail.com on May 30th, 2008
On May 27, 9:44 pm, Ray Trent <r...@nospam.nospam> wrote:
Does that mean that i have to write a UM service which reads for
horizontal scroll and post WM_H.. message. so that all app can get
that handle it?
- Posted by Ray Trent on May 30th, 2008
doublemaster007@gmail.com wrote:
Basically, yes. Though a "service" isn't the easiest way to do this (on
Vista, services are isolated from the user desktops, and even on XP
they're isolated from all but the first user's desktop). You probably
want an app that sits in the Run key (and pays attention to
fast-user-switching).
It won't work for everything, but at least some apps will respond to
WM_HSCROLL messages if you send them to exactly the right window.
--
Ray
- Posted by Abjad Hawwaz on May 31st, 2008
"Ray Trent" wrote:
Microsoft's hclient sample (see
http://msdn.microsoft.com/en-us/library/aa487251.aspx).
- Posted by doublemaster007@gmail.com on June 3rd, 2008
On May 30, 8:39 pm, Abjad Hawwaz <Abjad
Haw...@discussions.microsoft.com> wrote:
Thank you Ray Trent, Abjad Hawwaz
In HIDClent sample code where does it fetch data from the mouse? for
example say if i scroll the mouse in the sample where can i find the
information to read this data from the mouse?
- Posted by doublemaster007@gmail.com on June 3rd, 2008
On May 30, 8:39 pm, Abjad Hawwaz <Abjad
Haw...@discussions.microsoft.com> wrote:
Thank you Ray Trent, Abjad Hawwaz
In HIDClent sample code where does it fetch data from the mouse? for
example say if i scroll the mouse in the sample where can i find the
information to read this data from the mouse?
- Posted by Abjad Hawwaz on June 4th, 2008
<doublemaster007@gmail.com> wrote in message
news:a1a40417-ba94-48ea-996b-1a0e5d3d59bc@s21g2000prm.googlegroups.com...
To read data from a HID device, you first get a handle to the device by
calling CreateFile and then you call ReadFile. You can find where HClient
reads data if you search for "ReadFile". You will probably want to read data
asynchronously, so check out the AsynchReadThreadProc function in the
hclient.c file (I am looking at DDK 2600, which may be slightly different
from your version).
Please note that you cannot read data from a mouse or a keyboard. Windows NT
does not allow you to open these devices for reading. If you compile the
hclient sample, any attempts to read data from a mouse will fail. That's why
horizontal scroll data should be channeled through a separate top-level
collection, which cannot be a mouse or a keyboard and will appear to the
system as a HID-compliant device.
- Posted by Tim Roberts on June 5th, 2008
"doublemaster007@gmail.com" <doublemaster007@gmail.com> wrote:
Shouldn't you at least read through the code before asking this kind of
question? Here's a hint: the messages that are read from a HID device are
called "reports".
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.