GpiCloseSegment
Appearance
This function closes the current segment.
Syntax
GpiCloseSegment (hps)
Parameters
- hps (HPS) - input
- Presentation-space handle.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE - Successful completion
- FALSE - Error occurred.
==Errors?? Possible returns from WinGetLastError
- PMERR_INV_HPS (0x207F)
- An invalid presentation-space handle was specified.
- PMERR_PS_BUSY (0x20F4)
- An attempt was made to access the presentation space from more than one thread simultaneously.
- PMERR_INV_MICROPS_FUNCTION (0x20A1)
- An attempt was made to issue a function that is invalid in a micro presentation space.
- PMERR_NOT_IN_SEG (0x20E3)
- An attempt was made to end a segment using GpiCloseSegment while not in a segment bracket.
- PMERR_PATH_INCOMPLETE (0x20EC)
- An attempt was made to open or close a segment either directly or during segment drawing, or to issue GpiAssociate while there is an open path bracket.
- PMERR_AREA_INCOMPLETE (0x2005)
- One of the following has occurred: o A segment has been opened, closed, or drawn.
- GpiAssociate was issued while an area bracket was open.
- A drawn segment has opened an area bracket and ended without closing it.
Example Code
Declaration:
#define INCL_GPISEGMENTS /* Or use INCL_GPI, INCL_PM, */ #include <os2.h> HPS hps; /* Presentation-space handle. */ BOOL rc; /* Success indicator. */ rc = GpiCloseSegment(hps);