Retrieving the value of a capabilityΒΆ

GetDeviceCaps()

Retrieve the value of a capability


SYNTAX

GetDeviceCaps(window_id, capability)

Interrogate a device to return the value of a specified capability. The function returns TRUE or FALSE if a Boolean capability is asked for, or else returns the value of the capability itself. See the MSDN Library documentation on GetDeviceCaps for further information.

window_id

If a window_id is specified, the device interrogated is the windows device driver of the graphic display.

If NULL is specified, the current printer is interrogated.

capability

The capabilities which may be interrogated are listed under Device capabilities in $SCULPTOR/include/draw.h.


EXAMPLE

Retrieve the number of pixels per inch in the x and y axes

!temp Pixperinch_x,,i4
!temp Pixperinch_y,,i4

     Pixperinch_x = GetDeviceCaps(Window1, LOGPIXELSX)
     Pixperinch_y = GetDeviceCaps(Window1, LOGPIXELSY)

RELATED TOPICS

Drawing operations

Draw functions