SAMPLE: GDI Region, Clipping, and Bitmap Functions

Last reviewed: February 15, 1996
Article ID: Q103341
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) for Windows version 3.1

JIGSAW: Demonstrates GDI Region, Clipping, and Bitmap Functions

JIGSAW uses region functions (CreateRectRgn, CombineRgn, SetRectRgn), clipping functions (SelectClipRgn), and bitmap functions (BitBlt) from the Microsoft(R) Windows(TM) graphics device interface (GDI) to simulate a jigsaw puzzle.

These functions use less memory and fewer resources than individual picture box controls to display and move the different pieces of the puzzle around the window.

Region functions create, alter, and retrieve information about regions that can be filled with graphical output. You can use region functions with clipping functions to create clipping regions. A clipping region is a portion of a window where GDI creates output. If you send output to an area of a window outside a clipping region, the output will not be visible. Bitmap functions display bitmaps; these functions let you prepare images in memory and then copy the images to the display.

To load JIGSAW files in the Visual Basic(TM) environment, run VB.EXE, choose Open Project from the File menu, and select the JIGSAW.MAK file. You can also make an executable file and run it as a separate program using the Visual Basic run-time file VBRUN200.DLL.

JIGSAW was built with Microsoft Visual Basic version 3.0 and tested under Microsoft Windows version 3.1.

Download JIGSAW.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:

  • Microsoft Download Service (MSDL)

          Dial (206) 936-6735 to connect to MSDL
          Download JIGSAW.EXE (size: 25580 bytes) 
    
  • Internet (anonymous FTP)

          ftp ftp.microsoft.com
          Change to the \SOFTLIB\MSLFILES directory
          Get JIGSAW.EXE (size: 25580 bytes) 
    


Additional reference words: 3.10 softlib JIGSAW.EXE
KBCategory: kbprg kbfile
KBSubcategory: GdiMisc


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: February 15, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.