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.
GpiDestroyPS (1.2)
◄Function Group► ◄Overview► ◄Changes► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPICONTROL
BOOL GpiDestroyPS(hps)
HPS hps; /* presentation-space handle */
The GpiDestroyPS function destroys the presentation space and releases all
resources owned by the presentation space. This function should only be used
to destroy presentation spaces created by the GpiCreatePS function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
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_PS_BUSY
PMERR_PS_IS_ASSOCIATED
Example
This example uses the GpiDestroyPS function to destroy the presentation
space associated with a memory device context.
HDC hdc;
HPS hps;
SIZEL page = { 0, 0 };
/* Create the memory device context and presentation space. */
hdc = DevOpenDC(hab, OD_MEMORY, "*", 0L, (PDEVOPENDATA) NULL, (HDC) NULL);
hps = GpiCreatePS(hab, hdc, &page, PU_PELS | GPIT_MICRO | GPIA_ASSOC);
.
.
.
GpiAssociate(hps, (HDC) NULL);
GpiDestroyPS(hps); /* destroys presentation space */
DevCloseDC(hdc); /* closes device context */
See Also
GpiCreatePS
♦