Windows Screen Capture Sample Application ----------------------------------------- DESCRIPTION: ------------ Captures portions of the screen, specific windows, or the entire screen and saves it to a file or prints it. Uses DIBAPI functions to do most of the capture/printing/saving work. See the file DIBAPI.TXT for a description of the DIB api functions. This sample is an illustration of the following Windows techniques: - Capturing the screen (or a specific window) into a DIB - Capturing the screen to a Bitmap (device-dependent bitmap) - Printing a DIB using banding - Loading and Saving a DIB to a disk file (.BMP file) All of these are accomplished with calls to a simple-to-use DIB API. The DIB API provides the following functions: PrintWindow() - Prints all or part of a window PrintScreen() - Prints the entire screen CopyWindowToDIB() - Copies a window to a DIB CopyScreenToDIB() - Copies entire screen to a DIB CopyWindowToBitmap()- Copies a window to a standard Bitmap CopyScreenToBitmap()- Copies entire screen to a standard Bitmap PrintDIB() - Prints the specified DIB SaveDIB() - Saves the specified dib in a file LoadDIB() - Loads a DIB from a file DestroyDIB() - Deletes DIB when finished using it The source code to these functions are included in this sample. You can easily call these functions from a different application by simply including the proper source files and linking them to your application. The file DIBAPI.TXT contains more documentation on these functions. The source files for the DIB API are as follows: file.c - SaveDIB, LoadDIB, and DestroyDIB print.c - PrintDIB, PrintWindow, and PrintScreen copy.c - CopyWindowToDIB, CopyScreenToDIB, CopyWindowToBitmap, CopyScreenToBitmap dibapi.h - header file which contains prototypes for the DIB API functions dibutil.c - Utility functions errors.c - Defines all errors which can be returned from DIB API functions errors.h - Defines constants for all errors Other files: dialogs.c - Contains dialog routines for dialog boxes in WinCap wincap.c - Contains WinMain - this is the main program file for the WinCap sample makefile - Makefile for WinCap CREDITS: -------- Development Team: Mark Bader Patrick Schreiber Garrett McAuliffe Eric Flo Tony Claflin Written by Microsoft Product Support Services, Developer Support. COPYRIGHT NOTICE ---------------- THE INFORMATION AND CODE PROVIDED HEREUNDER (COLLECTIVELY REFERRED TO AS "SOFTWARE") IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 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. This Software may be copied and distributed royalty-free subject to the following conditions: 1. You must copy all Software without modification and must include all pages, if the Software is distributed without inclusion in your software product. If you are incorporating the Software in conjunction with and as a part of your software product which adds substantial value, you may modify and include portions of the Software. 2. You must place all copyright notices and other protective disclaimers and notices contained on the Software on all copies of the Software and your software product. 3. Unless the Software is incorporated in your software product which adds substantial value, you may not distribute this Software for profit. 4. You may not use Microsoft's name, logo, or trademarks to market your software product. 5. You agree to indemnify, hold harmless, and defend Microsoft and its suppliers from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of your software product and any modifications to the Software. Copyright (c) 1991 Microsoft Corporation. All rights reserved.