Re: How to show/hide cursor on attach/deattach usb mouse
- From: venkatyv <venkatyv@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 4 Dec 2008 23:29:01 -0800
I am also cloning mouhid.dll and inserting GUID, call to AdvertiseInterface.
Along with that Display Driver is modified with RequestDeviceNotifications,
and switching on/off the cursor. In the process can you please tell me the
following.
There is a component Mouse with SYSGEN_CURSOR in winCE6, does this has any
software cursor drawing API because paul is rightly said that my display
driver don't has hardware cursor drawing functions CursorOn()/CursorOff()
implemented. So that i can use Software cursor drawing API in the process of
handling USB mouse device notifications.
Is there a way by adding the following key, cursor can be enabled USB HID
mouse.
[HKEY_LOCAL_MACHINE\System\GDI\Drivers]
"Cursor"=dword:1
Thanks,
Venkat
"Paul G. Tobey [eMVP]" wrote:
The problem is that those calls don't exist in every driver! For example,.
the driver that I use has no call by that name... The GpeFlat driver has
it. The S3c2410 driver has it. Others do not.
Paul T.
"paolo patierno" <paolopatierno@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:77A515AA-3312-4614-BDF9-01D4A83FA461@xxxxxxxxxxxxxxxx
Hi,
I havn't developed the display driver....I hide the cursor inside the
CursorOn() e CursorOff() call.
Best regards
"venkatyv" wrote:
I too selected the same mouse component. i have USB mouse working but
cursor
is not visible. Can you please tell me what to be done in the display
driver
to get the mouse cursor.
Thanks,
Venkat
"paolo patierno" wrote:
Hi,
I use windows ce 5 and the catalog item for the mouse is under "Shell
and
user Interface" - "User Interface".
Paolo
"Venkat" wrote:
Hi paolo,
I am facing the same problem on my TI OMAP3 platform with Wince6. USB
mouse
is working perfectly but cursor is not visible. I don't find
CursorOn(),
CursorOff() functions in my BSP, can you tell me the functionality to
be
added to see the mouse pointer.
Thanks,
Venkat
"paolo patierno" wrote:
Thank you very much,
I have modified the display driver properly and all works...
Thanks
"Paul G. Tobey [eMVP]" wrote:
There's not going to be some simple way to do this. If you're
following my
model and using AdvertiseInterface() and
RequestDeviceNotifications(),
you'll have to start a thread during display driver load to
handle the
notifications. What you do when one such notification occurs
will depend on
*exactly* how the display driver works, which we don't know; it's
your
hardware's driver (you have the board support package). Maybe
calling
CursorOff() or CursorOn() does the right thing, but the name of
the function
is insufficient for us to guess what the function *actually
does*. You have
to read, understand, and modify the code appropriately.
Paul T.
"paolo patierno" <paolopatierno@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in message
news:85F01198-89FA-4F4C-BC70-AE4D07B8B79E@xxxxxxxxxxxxxxxx
Hi,
I have some problems....
My target platform has iMX31 Freescale processor with a
internal IPU...
I have found in file ddipu.h two functions :
CursorOn()
CursorOff()
The display drawing is made by the hw controller.....
Can you have any idea where i put registration notifications
for usb mouse
attached and to hide/show cursor....
Help !!
Thanks
"paolo patierno" wrote:
Thank you very much for your help. I hope that i will be
usefull...thanks
"Paul G. Tobey [eMVP]" wrote:
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...
- Follow-Ups:
- Re: How to show/hide cursor on attach/deattach usb mouse
- From: Paul G. Tobey [eMVP]
- Re: How to show/hide cursor on attach/deattach usb mouse
- References:
- Re: How to show/hide cursor on attach/deattach usb mouse
- From: Paul G. Tobey [eMVP]
- Re: How to show/hide cursor on attach/deattach usb mouse
- From: paolo patierno
- Re: How to show/hide cursor on attach/deattach usb mouse
- From: Venkat
- Re: How to show/hide cursor on attach/deattach usb mouse
- From: paolo patierno
- Re: How to show/hide cursor on attach/deattach usb mouse
- From: venkatyv
- Re: How to show/hide cursor on attach/deattach usb mouse
- From: paolo patierno
- Re: How to show/hide cursor on attach/deattach usb mouse
- From: Paul G. Tobey [eMVP]
- Re: How to show/hide cursor on attach/deattach usb mouse
- Prev by Date: Re: Make run time errors in WinCE6.0
- Next by Date: locating source code for datasync
- Previous by thread: Re: How to show/hide cursor on attach/deattach usb mouse
- Next by thread: Re: How to show/hide cursor on attach/deattach usb mouse
- Index(es):
Relevant Pages
|