NWAPPMakeCursor(3nw)


NWAPPMakeCursor -- creates a cursor based on the DIB information returned by ReadCursor

Synopsis

   #include <nwapp.h> 
   

HCURSOR NWAPPMakeCursor (HINSTANCE ghInst, HANDLE hDIB, LPPOINT lpptHotSpot);

Description

The parameters are as follows:

ghInst
(IN) Specifies a handle to a module or application instance.

hDIB
(IN) Specifies a handle to the cursor's DIB information.

lpptHotSpot
(IN) Points to a point structure indicating the location of the cursor's hot spot.

Return values

If successful, NWAPPMakeCursor returns a handle to a cursor. Otherwise, it returns NULL.

Notices

The steps involved in creating a cursor from a DIB are similar to those involved in creating an icon from a DIB and include:

  1. Obtain a pointer to the cursor's DIB bits.

  2. Divide the DIB'd height by 2 to account for the fact that the DIB stores both the XOR and the AND masks, one after the other.

  3. Determine the offset of the XOR bits.

  4. Determine the offset of the AND bits.

  5. Create a device dependent bitmap with the XOR bits.

  6. Obtain the device dependent XOR bitmask and save it in memory. (The AND bitmask is monochrome. Monochrome bits are identical in both the device dependent bitmaps and device independent bitmaps so there is no need to covert the AND bitmask.)

  7. Flip the monochrome AND bits by scanlines since a DIB is stored upside down.

  8. Use the XIO and AND bits to create a cursor by calling CreateCursor.

Services

NetWare Application Launcher (NAL) Services

References

NWAPPMakeIcon(3nw),


30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.