Share via


GPE::SetPointerShape (Windows Embedded CE 6.0)

1/6/2010

This method sets the shape of the pointer, the hot spot of the pointer, and the colors to use for the cursor if the cursor is multicolored. The graphics device interface (GDI) calls GPE::MovePointer separately to move or hide the cursor.

Syntax

SCODE GPE::SetPointerShape( 
  GPESurf* pMask, 
  GPESurf* pColorSurf, 
  int xHot, 
  int yHot, 
  int cx, 
  int cy 
);

Parameters

  • pMask
    [in] Pointer to a mask containing the cursor shape.
  • pColorSurf
    [in] Pointer to a surface specifying the colors to use for the cursor.
  • xHot
    [in] Horizontal location of the cursor's hot spot.
  • yHot
    [in] Vertical location of the cursor's hot spot.
  • cx
    [in] Width of the cursor.
  • cy
    [in] Height of the cursor.

Return Value

None.

Remarks

Cursor display is optional. The requirements of the Windows Embedded CEā€“based target platform determine whether cursors are necessary. If the platform uses a stylus or a shell without a pointer, no cursor is necessary, and the GPE pointer methods can return S_OK without doing any work. Furthermore, it may be acceptable, depending on the target platform display hardware, to display only monochrome cursors.

The pMask parameter points to a 1-bpp surface with a width of cx and a height of (2cy). The top half defines the AND mask for the pointer, and the lower half defines the XOR mask. Taken together, these masks provide two bits of information for each pixel of the pointer image. These masks provide for a black-and-white image and enable transparency and inversion of pointer pixels.

If pColorSurf is not NULL, use the colors for the corresponding pixels of the color surface instead of the XOR mask value for pixels where the AND mask value is zero.

The following truth table shows display results for different values in the AND and XOR masks.

AND mask value XOR mask value Result displayed on screen

0

0

Black.

0

1

White.

1

0

Transparent; pixel is unchanged.

1

1

Inverts the pixel color.

Requirements

Header gpe.h
Library Gpe_lib.lib
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

Display Driver Methods
GPE::MovePointer

Other Resources

Display Drivers