------------------------------------------------------------------------
      Copyright  1997 Microsoft Corporation.  All rights reserved.

 You have a royalty-free right to use, modify, reproduce and distribute
 the Sample Application Files (and/or any modified version) in any way
 you find useful, provided you agree that Microsoft has no warranty,
 obligations or liability for any Sample Application Files.
------------------------------------------------------------------------
                     Visual Basic Paint Effects Tool Sample
                        Readme document, April 16, 1997
Summary
-------
The Paint Effects Tool contains a PaintEffects class that provides 
methods for painting transparent and disabled (embossed) images.  The 
Sample includes a demonstration of each method.

Running the Sample
------------------
To run the Paint Effects Tool demonstration, open PntDemo.vbp in Visual 
Basic 5.0 and run the project.  The Paint Test form will be shown.  
Click the Paint button.  Many of the possible paint effects are 
demonstrated.

Using the Paint Effects Tool in Your project
--------------------------------------------
Add clsPntTl.cls and modPntTl.bas to your project.  Instanciate a 
PaintEffects class object and call the desired methods as described
below.

Paint Effects Tool Methods
--------------------------

PaintDisabledStdPic
-------------------
	Creates a disabled-appearing (grayed) bitmap, given any format
	of input bitmap.
Parameters:
   [hdcDest]
           Device Context (DC) to paint the picture on
   [xDest]
           X coordinate of the upper left corner of the area that the
           picture is to be painted on. (in pixels)
   [yDest]
           Y coordinate of the upper left corner of the area that the
           picture is to be painted on. (in pixels)
   [Width]
           Width of picture area to paint in pixels.  Note: If this value 
	   is outrageous (i.e.: you passed a forms ScaleWidth in twips 
	   instead of the pictures' width in pixels), this procedure will 
	   attempt to create bitmaps that require outrageous 
	   amounts of memory.
   [Height]
	   Height of picture area to paint in pixels.  Note: If this 
	   value is outrageous (i.e.: you passed a forms ScaleHeight in 
	   twips instead of the pictures' height in pixels), this 
	   procedure will attempt to create bitmaps that require 
	   outrageous amounts of memory.
   [picSource]
           Standard Picture object to be used as the image source
   [xSrc]
           X coordinate of the upper left corner of the area in the
	   picture to use as the source. (in pixels) Ignored 
	   if picSource is an Icon.
   [ySrc]
           Y coordinate of the upper left corner of the area in the
           picture to use as the source. (in pixels) Ignored if 
	   picSource is an Icon.
   [clrMask]
           Color of pixels to be masked out
   [clrHighlight]
           Color to be used as outline highlight
   [clrShadow]
           Color to be used as outline shadow
   [hPal]
           Handle of palette to select into the memory DC's used 
	   create the painting effect.  If not provided, a HalfTone
	   palette is used.

PaintDisabledDC
---------------
	Creates a disabled-appearing (grayed) bitmap, given any format 
	of input bitmap.
Parameters:
   [hdcDest]
           Device Context to paint the picture on
   [xDest]
           X coordinate of the upper left corner of the area that the
           picture is to be painted on. (in pixels)
   [yDest]
           Y coordinate of the upper left corner of the area that the
           picture is to be painted on. (in pixels)
   [Width]
           Width of picture area to paint in pixels.  Note: If this value 
	   is outrageous (i.e.: you passed a forms ScaleWidth in twips 
	   instead of the pictures' width in pixels), this procedure will 
	   attempt to create bitmaps that require outrageous 
	   amounts of memory.
   [Height]
	   Height of picture area to paint in pixels.  Note: If this 
	   value is outrageous (i.e.: you passed a forms ScaleHeight in 
	   twips instead of the pictures' height in pixels), this 
	   procedure will attempt to create bitmaps that require 
	   outrageous amounts of memory.
   [hdcSrc]
           Device Context that contains the source picture
   [xSrc]
           X coordinate of the upper left corner of the area in the 
	   picture to use as the source. (in pixels)
   [ySrc]
           Y coordinate of the upper left corner of the area in the
           picture to use as the source. (in pixels)
   [clrMask]
           Color of pixels to be masked out
   [clrHighlight]
           Color to be used as outline highlight
   [clrShadow]
           Color to be used as outline shadow
   [hPal]
           Handle of palette to select into the memory DC's used to 
	   create the painting effect.  If not provided, a HalfTone 
	   palette is used.

PaintTransparentStdPic
----------------------
	Draws a transparent bitmap to a DC.  The pixels of the passed
        bitmap that match the passed mask color will not be painted
        to the destination DC
Parameters:
   [hdcDest]
           Device Context to paint the picture on
   [xDest]
           X coordinate of the upper left corner of the area that the
           picture is to be painted on. (in pixels)
   [yDest]
           Y coordinate of the upper left corner of the area that the
           picture is to be painted on. (in pixels)
   [Width]
           Width of picture area to paint in pixels.  Note: If this value 
	   is outrageous (i.e.: you passed a forms ScaleWidth in twips 
	   instead of the pictures' width in pixels), this procedure will 
	   attempt to create bitmaps that require outrageous 
	   amounts of memory.
   [Height]
	   Height of picture area to paint in pixels.  Note: If this 
	   value is outrageous (i.e.: you passed a forms ScaleHeight in 
	   twips instead of the pictures' height in pixels), this 
	   procedure will attempt to create bitmaps that require 
	   outrageous amounts of memory.
           Height of picture area to paint in pixels
   [picSource]
           Source Standard Picture object
   [xSrc]
           X coordinate of the upper left corner of the area in the
	   picture to use as the source. (in pixels) Ignored if 
	   picSource is an Icon.
   [ySrc]
           Y coordinate of the upper left corner of the area in the
	   picture to use as the source. (in pixels) Ignored if 
	   picSource is an Icon.
   [clrMask]
           Color of pixels to be masked out
   [hPal]
           Handle of palette to select into the memory DC's used to
	   create the painting effect.  If not provided, a HalfTone
	   palette is used.

PaintTransparentDC
------------------
	Draws a transparent bitmap to a DC.  The pixels of the passed
        bitmap that match the passed mask color will not be painted
        to the destination DC
In:
   [hdcDest]
           Device Context to paint the picture on
   [xDest]
           X coordinate of the upper left corner of the area that the
           picture is to be painted on. (in pixels)
   [yDest]
           Y coordinate of the upper left corner of the area that the
           picture is to be painted on. (in pixels)
   [Width]
           Width of picture area to paint in pixels.  Note: If this value 
	   is outrageous (i.e.: you passed a forms ScaleWidth in twips 
	   instead of the pictures' width in pixels), this procedure will 
	   attempt to create bitmaps that require outrageous 
	   amounts of memory.
   [Height]
	   Height of picture area to paint in pixels.  Note: If this 
	   value is outrageous (i.e.: you passed a forms ScaleHeight in 
	   twips instead of the pictures' height in pixels), this 
	   procedure will attempt to create bitmaps that require 
	   outrageous amounts of memory.
   [hdcSrc]
           Device Context that contains the source picture
   [xSrc]
           X coordinate of the upper left corner of the area in the
	   picture to use as the source. (in pixels)
   [ySrc]
           Y coordinate of the upper left corner of the area in the
	   picture to use as the source. (in pixels)
   [clrMask]
           Color of pixels to be masked out
   [hPal]
           Handle of palette to select into the memory DC's used to
	   create the painting effect.  If not provided, a HalfTone
	   palette is used.

PaintNormalStdPic
-----------------
	Draws a standard picture object to a DC
Parameters:
   [hdcDest]
           Handle of the Device Context to paint the picture on
   [xDest]
           X coordinate of the upper left corner of the area that the
           picture is to be painted on. (in pixels)
   [yDest]
           Y coordinate of the upper left corner of the area that the
           picture is to be painted on. (in pixels)
   [Width]
           Width of picture area to paint in pixels.  Note: If this value 
	   is outrageous (i.e.: you passed a forms ScaleWidth in twips 
	   instead of the pictures' width in pixels), this procedure will 
	   attempt to create bitmaps that require outrageous 
	   amounts of memory.
   [Height]
	   Height of picture area to paint in pixels.  Note: If this 
	   value is outrageous (i.e.: you passed a forms ScaleHeight in 
	   twips instead of the pictures' height in pixels), this 
	   procedure will attempt to create bitmaps that require 
	   outrageous amounts of memory.
   [picSource]
           Picture to paint
   [xSrc]
           X coordinate of the upper left corner of the area in the
	   picture to use as the source. (in pixels)  Ignored if 
	   picSource is an Icon.
   [ySrc]
           Y coordinate of the upper left corner of the area in the
	   picture to use as the source. (in pixels) Ignored if 
	   picSource is an Icon.
   [hPal]
           Handle of palette to select into the memory DC's used to 
	   create the painting effect.  If not provided, a HalfTone 
	   palette is used.