Ivan
Thu Dec 13 18:52:42 PST 2007
Do you support GCAPS2_ALPHACURSOR ?
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"jrb1400" <jrb1400@discussions.microsoft.com> wrote in message
news:6B42CC78-85E6-4278-AF1C-BAB8906F999C@microsoft.com...
> Hi,
>
> I'm still having problems with cursor shapes and the mirror driver - here
> is an update.
>
> I went back to the Mirror Driver Sample Code and added routines to support
> DrvSetPointerShape
> DrvMovePointer
> DrvAlphaBlend
>
> All these routines do is pass their received parameters down to
> EngSetPointerShape, EngMovePointer, and EngAlphaBlend. Debug messages
> are
> printed out. (the code is posted below).
>
> I never saw EngAlphaBlend fail.
> EngSetPointerShape always returns SPS_ACCEPT_NOEXCLUDE. -- the doc says
> it
> will be SPS_ACCEPT_EXCLUDE or SPS_ERROR.
>
> I use the Sample Mirror Driver test app to enable the surface.
>> ddmlapp -e (enable)
>
> With this enabled, I get Mirror driver debug messages at the appropriate
> times - for example when the pointer should change to a resize handle, I
> get
> a debug printout at DrvSetPointerShape, and the cursor shape changes.
> This
> works consistently as one would expect.
>
> If I then use the mouse property sheets from the control panel to change
> the
> mouse schemes things usually fail. I get three or four calls to
> DrvSetPointerShape, but then no more. The pointer frequently changes to
> an
> hourglass and the stays that way. The mouse actions and clicks work
> normally
> so it is useable. I can move the mouse across all window borders,
> titlebars.
> corners, etc - no more calls to DrvSetPointerShape.
>
> The exception to this is when the mouse scheme is changed to one of these
> four schemes: (none), Default, Variations, or Inverted. With these
> four
> selections, the calls to DrvSetPointerShape resume as expected, and the
> pointer images also behave normally. Most (perhaps all) of the others
> exhibit the failure.
>
> I can run the test app to disconnect the mirror driver
>> ddmlapp -d (disable)
> When I do this, all mouse pointer changes work, but of course I get no
> further debug messages for DrvXxxx routines.
>
>
> Code added to Mirror Sample Driver....
>
>
> ULONG
> DrvSetPointerShape(
> IN SURFOBJ *pso,
> IN SURFOBJ *psoMask,
> IN SURFOBJ *psoColor,
> IN XLATEOBJ *pxlo,
> IN LONG xHot,
> IN LONG yHot,
> IN LONG x,
> IN LONG y,
> IN RECTL *prcl,
> IN FLONG fl
> )
> {
> ULONG status;
> DISPDBG((0,"DrvSetPointerShape\n"));
> status = EngSetPointerShape(pso, psoMask, psoColor, pxlo, xHot, yHot,
> x,
> y, prcl, fl);
> if (status == SPS_ERROR) {
> DISPDBG((0,"-- SPS_ERROR\n"));
> }
> else if (status == SPS_DECLINE) {
> DISPDBG((0,"-- SPS_DECLINE\n"));
> }
> else if (status == SPS_ACCEPT_NOEXCLUDE) {
> DISPDBG((0,"-- SPS_ACCEPT_NOEXCLUDE\n"));
> }
> else if (status == SPS_ACCEPT_EXCLUDE) {
> DISPDBG((0,"-- SPS_ACCEPT_EXCLUDE\n"));
> }
> else if (status == SPS_ACCEPT_SYNCHRONOUS) {
> DISPDBG((0,"-- SPS_ACCEPT_SYNCHRONOUS\n"));
> }
> else {
> DISPDBG((0,"-- UNKNOWN ERROR [%d]\n", status));
> }
> DISPDBG((0,"-- pso[%p] psoMask[%p] psoColor[%p] pxlo[%p]\n", pso,
> psoMask, psoColor, pxlo ));
> DISPDBG((0,"-- xHot[%p] yHot[%p] x[%d] y[%d] prcl[%p] fl[%d]\n", xHot,
> yHot, x, y, prcl, fl));
>
> return(status);
> }
>
> VOID
> DrvMovePointer(
> IN SURFOBJ *pso,
> IN LONG x,
> IN LONG y,
> IN RECTL *prcl
> )
> {
> DISPDBG((1,"DrvMovePointer\n"));
> EngMovePointer(pso, x, y, prcl);
> }
>
> BOOL
> DrvAlphaBlend(
> IN SURFOBJ *psoDest,
> IN SURFOBJ *psoSrc,
> IN CLIPOBJ *pco,
> IN XLATEOBJ *pxlo,
> IN RECTL *prclDest,
> IN RECTL *prclSrc,
> IN BLENDOBJ *pBlendObj
> )
> {
> BOOL status;
> DISPDBG((1,"DrvAlphaBlend\n"));
> status =
> EngAlphaBlend(psoDest,psoSrc,pco,pxlo,prclDest,prclSrc,pBlendObj);
> if (!status) {
> DISPDBG((0,"-- FAILED\n"));
> }
> return (status);
> }
>
>
>