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.
GpiDeleteSetId (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPILCIDS
 
BOOL GpiDeleteSetId(hps, lcid)
HPS hps;      /* presentation-space handle           */
LONG lcid;    /* local identifier for font or bitmap */
 
The GpiDeleteSetId function deletes a logical font or removes the tag from a
tagged bitmap, depending on the object identified by local identifier lcid.
If the object is a logical font, the function deletes it, making it no
longer available for use. If the object is a bitmap, the function removes
the tag, but the bitmap handle remains valid. In either case, the function
frees the local identifier for use with another object.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
lcid       Specifies the local identifier for the object. If this parameter
           is set to LCID_ALL, the function deletes all logical fonts and
           removes the tags from all tagged bitmaps.
 
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_INV_HPS
     PMERR_INV_SETID
     PMERR_PS_BUSY
     PMERR_SETID_NOT_FOUND
 
Example
 
This example uses the GpiDeleteSetId function to delete a logical font. The
GpiSetCharSet function is required only if the logical font is the current
font for the presentation space.
 
FATTRS fat;
 
/* create and set the font */
 
GpiCreateLogFont(hps, (PSTR8) NULL, 1L, &fat);
GpiSetCharSet(hps, 1L);
    .
    .
    .
GpiSetCharSet(hps, 0L);          /* release the font before deleting */
GpiDeleteSetId(hps, 1L);         /* delete the logical font          */
 
See Also
 
GpiSetBitmapId, GpiSetCharSet, WinGetLastError