Information About Clipping, GetDeviceCaps() and GDI

Last reviewed: July 22, 1997
Article ID: Q22538
3.00 3.10 WINDOWS kbprg

The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) for Windows versions 3.0 and 3.1

When the GetDeviceCaps(hDC,CLIPCAPS) function is used on an Epson FX-80 printer, it returns zero (0), which means that the printer does not support clipping. The explanation below describes how the GetDeviceCaps() function, the Windows Graphics Device Interface (GDI), and clipping interact with each other.

The GetDeviceCaps() function reports what subset of the GDI services the device directly supports. The complete list of GDI services is available in the documentation. The GDI will simulate functions that the device does not directly support using those functions that are available on the device.

The Epson FX-80 printer does not support clipping to any particular portion of the page, even in graphics mode, which is precisely what the GetDeviceCaps() function indicates.

GDI provides at least a minimum level of services for all devices. In particular, if a clipshape is set while a document is being printed, the programmer can be assured that GDI will honor that clipshape. GDI works with the information returned in the GetDeviceCaps() function to determine what services GDI must provide on behalf of the device. In this case, the printer does not perform clipping; clipping is provided by GDI. The GetDeviceCaps() function can indicate how much additional work GDI must perform to accomplish a particular function. The programmer may want to modify a request to speed processing.

Also note that DC stands for device context. The most interesting DC is for the display [and, in fact, it is the device context for the display that is returned by GetDC(), and in the PAINTSTRUCT structure returned by BeginPaint()]. Printer DCs are NEVER contexts for the display; they are device contexts.


Additional reference words: 3.00 3.10
KBCategory: kbprg
KBSubcategory: GdiDc
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.