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.
GpiComment (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIPRIMITIVES
 
BOOL GpiComment(hps, cbData, pbData)
HPS hps;         /* presentation-space handle     */
LONG cbData;     /* length of comment string      */
PBYTE pbData;    /* address of the comment string */
 
The GpiComment function adds a comment string to a segment.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
cbData     Specifies the length in bytes of the comment string pointed to by
           pbData.
 
pbData     Points to the comment string. The string must not be longer than
           255 bytes.
 
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_LENGTH_OR_COUNT
     PMERR_PS_BUSY
 
Example
 
This example uses the GpiComment function to comment the contents of a
segment.
 
POINTL ptlStart = { 0, 0 };
POINTL ptlTriangle[] = { 100, 100, 200, 0, 0, 0 };
 
GpiOpenSegment(hps, 0L);                        /* open the segment  */
GpiComment(hps, 18L, "Start point (0, 0)");
GpiMove(hps, &ptlStart);
GpiComment(hps, 13L, "Draw triangle");
GpiPolyLine(hps, 3L, ptlTriangle);
GpiCloseSegment(hps);                           /* close the segment */
 
See Also
 
GpiCloseSegment, GpiMove, GpiOpenSegment, GpiPolyLine