gpi12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GpiDeleteBitmap (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIBITMAPS
 
BOOL GpiDeleteBitmap(hbm)
HBITMAP hbm;    /* bitmap handle */
 
The GpiDeleteBitmap function deletes the bitmap specified by hbm.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hbm        Identifies the bitmap to delete.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_BITMAP_IS_SELECTED
     PMERR_INV_HBITMAP
 
Example
 
This example uses the GpiDeleteBitmap function to delete a bitmap. The
GpiSetBitmap function releases the bitmap from the presentation space before
deleting it. This is needed only if the bitmap is set in the presentation
space.
 
HBITMAP hbm, hbmPrevious;
 
hbm = GpiLoadBitmap(hps, (HMODULE) NULL, 1, 0L, 0L); /* load the bitmap   */
hbmPrevious = GpiSetBitmap(hps, hbm);                /* set bitmap for PS */
 
/* use GpiBitBlt to display bitmap */
 
GpiSetBitmap(hps, hbmPrevious);                 /* release bitmap from PS */
GpiDeleteBitmap(hbm);                           /* delete the bitmap      */
 
See Also
 
GpiCreateBitmap, GpiLoadBitmap, GpiQueryDeviceBitmapFormats, GpiSetBitmap,
WinGetLastError