Windows 7 - EngLockSurface and mouse pointer in display driver

Asked By Mas on 20-May-08 10:49 AM

I have a problem with the mouse pointer in my display driver. In DrvEscape I
call EngLockSurface on a device bitmap to be able to cache the data in
pvBits. Within the preceding call to DrvCopyBits the mouse pointer was
rendered to exactly this device bitmap. but in the locked bitmap in DrvEscape
the mouse pointer is not present. the wallpaper, a window, anything but the
pointer is on the surface. there was no call to any drawing function in the
driver whereby the pointer could be removed. so my question: where is the
pointer gone? any idea?

thanks, mase

Mas replied on 21-May-08 05:44 AM
Hello again.

the problem with my mouse pointer has been "solved". I found out two things:

1: I don't have to lock the surface from which I want to copy the data
because it is passed into DrvEscape()...

I found out that the mouse pointer is still on the surface but getting the
data correctly out of pvBits failt. In DrvEscape() I use EngCopyBits() to
copy a part of the surface onto another surface. both surfaces are created by
me in DrvEnableSurface() and their type is "STYPE_BITMAP". I don't know why,
but in DrvEscape() the type of the passed in surface is not "STYPE_BITMAP"
but "STYPE_DEVICE". If I set the type back to "STYPE_BITMAP" in DrvEscape()
everything works fine...