NWAPPMakeIcon(3nw)


NWAPPMakeIcon -- creates an icon based on the DIB information returned by ReadIcon

Synopsis

   #include <nwapp.h> 
   

HICON NWAPPMakeIcon (HINSTANCE ghInst, HANDLE hDIB);

Description

The parameters are as follows:

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

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

Return values

If successful, NWAPPMakeIcon returns a handle to a newly created icon. Otherwise, it returns NULL.

Notices

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

  1. Obtain a pointer to the icon'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 an icon by calling CreateIcon.

Services

NetWare Application Launcher (NAL) Services

References

NWAPPMakeCursor(3nw),


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