Re: How to show/hide cursor on attach/deattach usb mouse



It should be obvious that the answer to that depends on the display driver.
There's no 'enable/disable cursor here' function. Nor is there a right
answer about what you actually need to do. If your driver is using a
hardware cursor implemented in the display hardware, you'd do one thing. If
it's drawing the cursor itself in software, you'd do something different.
This is where you earn your money!

Paul T.

"paolo patierno" <paolopatierno@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F4E9A6CE-12CC-4D46-880B-0063EBD67506@xxxxxxxxxxxxxxxx
Ah....and what is the right code portion to modify in the display driver
to
receive notifications and to hide cursor ?

Thanks..

"Paul G. Tobey [eMVP]" wrote:

No. ShowCursor() is application-specific. You may decrement the cursor
count for services.exe well below zero, but that won't cause the cursor
to
be hidden for all applications.

Paul T.

"paolo patierno" <paolopatierno@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:21AE7736-11B8-43E5-90DA-FC1314B1B55C@xxxxxxxxxxxxxxxx
My idea wasn't to modify display driver but to create a windows ce
service
that receive notifications and use ShowCursor....it works ??

"Paul G. Tobey [eMVP]" wrote:

Well, since I need it in both mouhid and the display driver, I put it
in
a
platform-specific header file, devclassmouse.h, in case you're
curious.
I
could not use the IClass registry entry and make it work, because I
was
starting with the PS/2 mouse, so I'm not 100% sure about that for the
USB
case.

Paul T.

"paolo patierno" <paolopatierno@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:C35E55B8-75E2-48C2-B777-32C7604BCD73@xxxxxxxxxxxxxxxx
Can you give me other information.
In which file did you add the #define ?
Can I use the registry key HID mouse and setting its IClass = GUID
instead
of call AdvertiseInterface in the mouse driver ?

Thanks very much....

"Paul G. Tobey [eMVP]" wrote:

I did this myself by, as you seem to be doing, cloning mouhid and
arranging
for it to notify the system that a mouse was attached
(AdvertiseInterface).
Here's the class I used for that:

#define DEVCLASS_MOUSE_GUID_STRING
TEXT("{FFBE5A05-87B4-4591-B067-CEBA6FAFD298}")
#define DEVCLASS_MOUSE_GUID { 0xFFBE5A05, 0x87B4, 0x4591, { 0xB0,
0x67,
0xCE, 0xBA, 0x6F, 0xAF, 0xD2, 0x98 } }

This particular GUID was suggested as a de facto standard by Steve
Maillet a
while back, so I used it.

To actually turn the cursor on and off, which is a function of the
display
driver, I modified my display driver to use
RequestDeviceNotifications:

GUID devguid = DEVCLASS_MOUSE_GUID;

// Ask for device notifications to be sent. Note that we set the
// last parameter to true to indicate that we want notifications
// for devices already connected.
notH = RequestDeviceNotifications( &devguid, msgQ, TRUE );

and so on. Of course, it asks for all device events, even those
for
devices
that were attached before the display driver was executed, since
you
don't
want to depend on the mouse to be advertised *after* the display
driver
requested notifications. In the handler for a notification of the
mouse,
I
do the right thing to turn cursor display in the driver on/off.

Paul T.

"paolo patierno" <paolopatierno@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:B7E6AE51-BE98-470E-87AE-CD484DFF6C89@xxxxxxxxxxxxxxxx
hi,
I want to develop a windows ce service who received notifications
on
usb
mouse attach/deattach and then show/hide the cursor. I read that
I
must
add a
GUID (IClass) to mouhid.dll (i must clone it) and then use
RequestDeviceNotifications.

Can I have some help !?

Thanks...











.



Relevant Pages

  • Re: How to show/hide cursor on attach/deattach usb mouse
    ... The display drawing is made by the hw controller..... ... Can you have any idea where i put registration notifications for usb mouse ... There's no 'enable/disable cursor here' function. ... of call AdvertiseInterface in the mouse driver? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How to show/hide cursor on attach/deattach usb mouse
    ... Along with that Display Driver is modified with RequestDeviceNotifications, ... and switching on/off the cursor. ... handling USB mouse device notifications. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How to show/hide cursor on attach/deattach usb mouse
    ... You may decrement the cursor ... of call AdvertiseInterface in the mouse driver? ... I modified my display driver to use ... // Ask for device notifications to be sent. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How to show/hide cursor on attach/deattach usb mouse
    ... I have modified the display driver properly and all works... ... Can you have any idea where i put registration notifications for usb mouse ... There's no 'enable/disable cursor here' function. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How to show/hide cursor on attach/deattach usb mouse
    ... you'll have to start a thread during display driver load to handle the ... Can you have any idea where i put registration notifications for usb mouse ... There's no 'enable/disable cursor here' function. ...
    (microsoft.public.windowsce.platbuilder)

Loading