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.
GpiSetDrawControl (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPICONTROL
BOOL GpiSetDrawControl(hps, lControl, flDraw)
HPS hps; /* presentation-space handle */
LONG lControl; /* draw control to change */
LONG flDraw; /* drawing flag */
The GpiSetDrawControl function sets the current draw controls. The draw
controls specify whether the system carries out certain actions, such as
accumulating boundary data, when the application draws. The function sets
the draw control specified by the lControl parameter by turning it on or off
as specified by the flDraw parameter. By default, all draw controls except
DCTL_DISPLAY are off.
The function cannot be used in an open segment or in an area, path, or
element bracket.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
lControl Specifies the draw control to set. It can be one of the following
values:
Value Meaning
─────────────────────────────────────────────────────────────────
DCTL_BOUNDARY Accumulate boundary data. During any output
operations except GpiErase, accumulate the
bounding rectangle of the drawing. This control
can be used with a micro presentation space.
DCTL_CORRELATE Correlate the GpiPutData, GpiElement, and
primitive functions. This control causes these
functions to return GPI_HITS if the drawing
intersects with the pick aperture. This control
applies only to drawing functions used when the
drawing mode is DM_DRAW or DM_DRAWANDRETAIN.
Also, it does not effect execution of functions
stored in a segment. This control can be used
with a micro presentation space.
DCTL_DISPLAY Allow drawing to occur on the device. If this
control is off, no output, other than output for
GpiErase, appears on the device associated with
the presentation space. This control can be used
with a micro presentation space.
DCTL_DYNAMIC Draw dynamic segments. This control causes the
GpiDrawChain, GpiDrawFrom, and GpiDrawSegment
functions to call the GpiRemoveDynamics function
before drawing and the GpiDrawDynamics function
after drawing. The effect is to update the
dynamic segments each time the picture chain or a
segment is drawn.
DCTL_ERASE Erasing before drawing. This control causes the
GpiDrawChain, GpiDrawFrom, and GpiDrawSegment
functions to call the GpiErase function before
drawing.
flDraw Specifies whether to turn a draw control on or off. It can be one
of the following values:
Value Meaning
─────────────────────────────────────────────────────────────────
DCTL_OFF Set control off.
DCTL_ON Set control on.
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_DRAW_CONTROL
PMERR_INV_DRAW_VALUE
PMERR_INV_HPS
PMERR_INV_IN_AREA
PMERR_INV_IN_ELEMENT
PMERR_INV_IN_PATH
PMERR_INV_IN_SEG
PMERR_INV_MICROPS_FUNCTION
PMERR_PS_BUSY
See Also
GpiDrawChain, GpiDrawDynamics, GpiDrawFrom, GpiDrawSegment, GpiElement,
GpiErase, GpiPutData, GpiQueryDrawControl, GpiRemoveDynamics,
WinGetLastError
♦