MASKBLT: Demonstrates Win32 MaskBlt Function

MASKBLT provides an easy-to-use demonstration of the
MaskBlt function in the Win32(TM) application programming
interface (API). The program displays a dialog box that
allows you to manipulate the parameters to MaskBlt. The
main window has three sections: the source bitmap is
displayed in the center, the monochrome bitmap mask is
displayed on the right, and the destination bitmap is
displayed on the left.

You can change the destination rectangle either from the
dialog box or by using the direct-manipulation object in
the left section of the window. Clicking and dragging the
mouse in the upper-left corner moves the rectangle;
clicking and dragging the mouse in the lower-right corner
sizes the rectangle. The function requires only a starting
point (not a rectangle) for the source and mask bitmaps.
Additional direct-manipulation objects are provided for
the source and for the mask. You can move these objects by
clicking and dragging with the mouse.

You can change the raster operation for the MaskBlt
function by changing the values in the rightmost entry
fields in the dialog box. These entries are interpreted in
hexadecimal. The combo box directly below these fields
lists all standard raster operations. When you select a
standard ROP from this combo box, the contents of the
combo box are copied into the ROP entry fields and used in
the MaskBlt call.

MASKBLT provides Clipboard support as follows:

>  Press CTRL+INSERT to copy the destination image to the
Clipboard.

>  Press SHIFT+INSERT to copy a bitmap from the Clipboard
to the source region.

>  Press ALT+INSERT to do both. This key sequence copies
the destination image to the Clipboard and then down to
the source region.

The Microsoft(R) Windows NT(TM) version 3.1 operating
system was not available at the time this sample was
acquired for the Microsoft Developer Network CD. For this
reason, the CD includes only the source files for the
sample, not the executable file or any DLLs. If you have
Windows NT version 3.1 installed on your system, you may
copy the source files to your hard drive and invoke the
Windows NT make file to build the sample.

KEYWORDS: CD4; _lclose; _lopen; _lread; AngleArc;
BeginPaint; BitBlt; ClientToScreen; CloseClipBoard;
CreateCompatibleBitmap; CreateCompatibleDC; CreateDialog;
CreateDIBitmap; CreatePen; CreateRectRgnIndirect;
 CreateWindow; DeleteDC; DeleteObject; DispatchMessage;
DPtoLP; EndPaint; FillRect; GetClassLong; GetClientRect;
GetClipboardData; GetClipBox; GetDC; GetDlgItemInt;
GetDlgItemtext; GetFileSize; GetMessage; GetObject;
GetStockObject; GetViewportOrgEx; GetWorldTransform;
InvalidateRect; LineTo; LoadAccelerators; LoadCursor;
LoadIcon; LocalAlloc; LocalFree; LocalHandle; LPtoDP;
IsWindow; MaskBlt; MessageBox; ModifyWorldTransform;
MoveToEx; OpenClipboard; OpenFile; PostMessage;
PostQuitMessage; PtInRect; Rectangle; ReleaseCapture;
ReleaseDC; SelectClipRgn; SelectObject;
SendDlgItemMessage; SendMessage; SetCapture;
SetClipboardData; SetCursorPos; SetDlgItemInt;
SetDlgItemText; SetROP2; SetViewportOrgEx; SetWindowPos;
SetWorldTransform; ShowWindow; StretchBlt
