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.
DevQueryCaps (1.2)
Changes                                             Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DEV
 
BOOL DevQueryCaps(hdc, lStartitem, cItems, alItems)
HDC hdc;            /* device-context handle            */
LONG lStartitem;    /* first item to be returned        */
LONG cItems;        /* number of items to be returned   */
PLONG alItems;      /* array for device characteristics */
 
The DevQueryCaps function queries the characteristics of the specified
device.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
hdc         Identifies the device context.
 
lStartitem  Specifies the first item of information to be returned in the
            array.
 
cItems      Specifies the number of items to be returned in the array.
 
alItems     Points to an array of device characteristics, starting with the
            item specified by the lStartitem parameter.
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_INV_HDC
     PMERR_INV_LENGTH_OR_COUNT
     PMERR_INV_QUERY_ELEMENT_NO
 
Comments
 
The following are possible values for the alItems parameter:
 
Value                        Meaning
────────────────────────────────────────────────────────────────────────────
CAPS_FAMILY                  Specifies the device type. These values are the
                             same as the values for the type parameter in
                             the DevOpenDC function.
 
CAPS_IO_CAPS                 Specifies the device input/output capability.
                             The possible values are as follows:
 
                             Value                Meaning
                             ───────────────────────────────────────────────
                             CAPS_IO_DUMMY        Dummy device
 
                             CAPS_IO_SUPPORTS_OP  Output
 
                             CAPS_IO_SUPPORTS_IP  Input
 
                             CAPS_IO_SUPPORTS_IO  Output and input
 
CAPS_TECHNOLOGY              Specifies the technology. The possible values
                             are as follows:
 
                             Value                     Meaning
                             ───────────────────────────────────────────────
                             CAPS_TECH_UNKNOWN         Unknown (for example,
                                                       metafile)
 
                             CAPS_TECH_VECTOR_PLOTTER  Vector plotter
 
                             CAPS_TECH_RASTER_DISPLAY  Raster display
 
                             CAPS_TECH_RASTER_PRINTER  Raster printer
 
                             CAPS_TECH_RASTER_CAMERA   Raster camera
 
                             CAPS_TECH_POSTSCRIPT      PostScript printer
 
CAPS_DRIVER_VERSION          Specifies the device-driver version number.
 
CAPS_HEIGHT                  Specifies the media depth (for a full-screen,
                             maximized window on a display) in pels. (For a
                             plotter, a pel is defined as the smallest
                             possible displacement of the pen and can be
                             smaller than a pen width.)
 
CAPS_WIDTH                   Specifies the media width (for a full-screen,
                             maximized window for displays) in pels.
 
CAPS_HEIGHT_IN_CHARS         Specifies the media depth (for a full-screen,
                             maximized window for displays) in character
                             rows, for Vio calls only.
 
CAPS_WIDTH_IN_CHARS          Specifies the media width (for a full-screen,
                             maximized window for displays) in character
                             columns, for Vio calls only.
 
CAPS_HORIZONTAL_FONT_RES     Specifies the horizontal resolution (in pels
                             per inch) for printers; for displays, this
                             value may differ from the actual horizontal
                             device resolution.
 
CAPS_VERTICAL_FONT_RES       Specifies the vertical resolution (in pels per
                             inch) for printers; for displays, this value
                             may differ from the actual vertical device
                             resolution.
 
CAPS_VERTICAL_RESOLUTION     Specifies the vertical resolution (in pels per
                             meter) of the device.
 
CAPS_HORIZONTAL_RESOLUTION   Specifies the horizontal resolution (in pels
                             per meter) of the device.
 
CAPS_CHAR_HEIGHT             Specifies the default height (in pels) of the
                             character box.
 
CAPS_CHAR_WIDTH              Specifies the default width (in pels) of the
                             character box.
 
CAPS_SMALL_CHAR_HEIGHT       Specifies the default height (in pels) of the
                             small character box. This number is zero if
                             there is only one size of the character box.
 
CAPS_SMALL_CHAR_WIDTH        Specifies the default width (in pels) of the
                             small character box. This number is zero if
                             there is only one size of the character box.
 
CAPS_COLORS                  Specifies the number of distinct colors
                             supported at the same time, including reset
                             (gray-scales count as distinct colors). If
                             loadable color tables are supported, this is
                             the number of entries in the device color
                             table. For plotters, the value returned is the
                             number of pens plus one (for the background).
 
CAPS_MOUSE_BUTTONS           Specifies the number of mouse or tablet buttons
                             that are available. A returned value of zero
                             indicates that there are no mouse or tablet
                             buttons available.
 
CAPS_FOREGROUND_MIX_SUPPORT  Specifies the foreground-mix support. The
                             possible values are as follows:
 
                             Value                    Meaning
                             ───────────────────────────────────────────────
                             CAPS_FM_OR               OR
 
                             CAPS_FM_OVERPAINT        Overpaint
 
                             CAPS_FM_XOR              XOR
 
                             CAPS_FM_LEAVEALONE       Leave-alone
 
                             CAPS_FM_AND              AND
 
                             CAPS_FM_GENERAL_BOOLEAN  Mixes 7 through 17
 
                             The value returned is the sum of the values
                             appropriate to the mixes supported. A device
                             capable of supporting the OR mix mode must, as
                             a minimum, return 1 + 2 + 16 = 19, signifying
                             support for the mandatory mix modes OR,
                             overpaint, and leave-alone. Note that these
                             numbers correspond to the decimal
                             representation of a bit string that is seven
                             bits long, with each bit set to 1 if the
                             appropriate mode is supported.
 
CAPS_BACKGROUND_MIX_SUPPORT  Specifies the background-mix support. The
                             possible values are as follows:
 
                             Value               Meaning
                             ───────────────────────────────────────────────
                             CAPS_BM_OR          OR
 
                             CAPS_BM_OVERPAINT   Overpaint
 
                             CAPS_BM_XOR         XOR
 
                             CAPS_BM_LEAVEALONE  Leave-alone
 
                             The value returned is the sum of the values
                             appropriate to the mixes supported. A device
                             must, as a minimum, return 2 + 16 = 18,
                             signifying support for the mandatory background
                             mixes overpaint and leave-alone. Note that
                             these numbers correspond to the decimal
                             representation of a bit string that is five
                             bits long, with each bit set to 1 if the
                             appropriate mode is supported.
 
CAPS_LOADABLE_SYMBOL_SETS    Specifies the number of fonts that may be
                             loaded for Vio.
 
CAPS_WINDOW_BYTE_ALIGNMENT   Specifies whether the client area of VIO
                             windows should be byte-aligned. The possible
                             values are as follows:
 
                             Value                         Meaning
                             ───────────────────────────────────────────────
                             CAPS_BYTE_ALIGN_REQUIRED      Must be
                                                           byte-aligned.
 
                             CAPS_BYTE_ALIGN_RECOMMENDED   More efficient if
                                                           byte-aligned, but
                                                           not required.
 
                             CAPS_BYTE_ALIGN_NOT_REQUIRED  Does not matter
                                                           whether
                                                           byte-aligned.
 
CAPS_BITMAP_FORMATS          Specifies the number of bitmap formats
                             supported by the device.
 
CAPS_RASTER_CAPS             Specifies the raster-operations capability of
                             the device. The possible values are as
                             follows:
 
                             Value                       Meaning
                             ───────────────────────────────────────────────
                             CAPS_RASTER_BITBLT          BitBlt supported
 
                             CAPS_RASTER_BANDING         Banding supported
 
                             CAPS_RASTER_BITBLT_SCALING  Scaling supported
 
                             CAPS_RASTER_SET_PEL         Set PEL support
 
CAPS_MARKER_WIDTH            Specifies the default width (in pels) of the
                             marker box.
 
CAPS_MARKER_HEIGHT           Specifies the default depth (in pels) of the
                             marker box.
 
CAPS_DEVICE_FONTS            Specifies the number of device-specific fonts.
 
CAPS_GRAPHICS_SUBSET         Specifies the graphics-drawing subset supported
                             (3 indicates GOCA DR/3).
 
CAPS_GRAPHICS_VERSION        Specifies the graphics-architecture version
                             supported (1 indicates version 1).
 
CAPS_GRAPHICS_VECTOR_SUBSET  Specifies the graphics-vector-drawing subset
                             supported (2 indicates GOCA VS/2).
 
CAPS_GRAPHICS_CHAR_WIDTH     Specifies the default Gpi character-box width
                             (in pels).
 
CAPS_GRAPHICS_CHAR_HEIGHT    Specifies the default Gpi character-box height
                             (in pels).
 
CAPS_DEVICE_WINDOWING        Specifies the support for device windows. This
                             value may be CAPS_DEV_WINDOWING_SUPPORT if the
                             device supports windowing.
 
CAPS_ADDITIONAL_GRAPHICS     Specifies additional graphics support. The
                             possible values are as follows:
 
                             Value                          Meaning
                             ───────────────────────────────────────────────
                             CAPS_GRAPHICS_KERNING_SUPPORT  The device
                                                            supports
                                                            kerning.
 
                             CAPS_FONT_OUTLINE_DEFAULT      Outline font is
                                                            the default.
 
                             CAPS_FONT_IMAGE_DEFAULT        Font image is
                                                            the default.
 
                             CAPS_SCALED_DEFAULT_MARKERS    Scaled default
                                                            markers.
 
CAPS_RESERVED                Specifies the maximum number of distinct colors
                             available at one time.
 
CAPS_PHYS_COLORS             Specifies the maximum number of distinct colors
                             that can be specified on the device.
 
CAPS_COLOR_INDEX             Specifies the maximum logical-color-table index
                             supported for the device. This value must be at
                             least 7. For the EGA and VGA device drivers,
                             the value is 63.
 
CAPS_COLOR_PLANES            Specifies the number of color planes.
 
CAPS_COLOR_BITCOUNT          Specifies the number of adjacent color bits for
                             each pel (within one plane).
 
CAPS_COLOR_TABLE_SUPPORT     Specifies the support for loadable color
                             tables. It can be one of the following values:
 
                             Value                     Meaning
                             ───────────────────────────────────────────────
                             CAPS_COLTABL_RGB_8        Set if the RGB color
                                                       table can be loaded,
                                                       with a minimum
                                                       support of 8 bits
                                                       each for red, green,
                                                       and blue.
 
                             CAPS_COLTABLE_RGB_8_PLUS  Set if a color table
                                                       with other than 8
                                                       bits for each primary
                                                       color can be loaded.
 
                             CAPS_COLTABLE_TRUE_MIX    Set if true mixing
                                                       occurs when the
                                                       logical color table
                                                       has been realized,
                                                       providing that the
                                                       size of the logical
                                                       color table is not
                                                       greater than the
                                                       number of distinct
                                                       colors supported (see
                                                       CAPS_COLORS).
 
                             CAPS_COLTABL_REALIZE      Set if a loaded color
                                                       table can be
                                                       realized.
 
See Also
 
DevOpenDC