BCX_PUT statement

Purpose: BCX_PUT puts a bitmap on a window.


 Syntax:

 BCX_PUT(hWndDest, _
              hBmp, _
         LeftDest%, _
          TopDest%, _
        WidthDest%, _
       HeightDest%, _
         [RopCode%] _
          [DrawHDC])

 Parameters:

  • hWndDest HWND handle to the window on which the bitmap is to be placed.
  • hBmp HBITMAP handle to the bitmap to be copied to hWndDest.
  • LeftDest% Horizontal position of upper left corner of destination of bitmap
  • TopDest% Vertical position of upper left corner of destination of bitmap
  • WidthDest% Width of area of destination of bitmap
  • HeightDest% Height of area of destination of bitmap
  • RopCode% [OPTIONAL] specifies a raster-operation code. These codes define how the color data for the source rectangle is to be combined with the color data for the destination rectangle to achieve the final color. The default code is SRCCOPY. The following list shows some common raster operation codes:
    • BLACKNESS Fills the destination rectangle using the color associated with index 0 in the physical palette.(This color is black for the default physical palette.)
    • DSTINVERT Inverts the destination rectangle.
    • MERGECOPY Merges the colors of the source rectangle with the specified pattern by using the Boolean AND operator.
    • MERGEPAINT Merges the colors of the inverted source rectangle with the colors of the destination rectangle by using the Boolean OR operator.
    • NOTSRCCOPY Copies the inverted source rectangle to the destination.
    • NOTSRCERASE Combines the colors of the source and destination rectangles by using the Boolean OR operator and then inverts the resultant color.
    • PATCOPY Copies the specified pattern into the destination bitmap.
    • PATINVERT Combines the colors of the specified pattern with the colors of the destination rectangle by using the Boolean XOR operator.
    • PATPAINT Combines the colors of the pattern with the colors of the inverted source rectangle by using the Boolean OR operator. The result of this operation is combined with the colors of the destination rectangle by using the Boolean OR operator.
    • SRCAND Combines the colors of the source and destination rectangles by using the Boolean AND operator.
    • SRCCOPY Copies the source rectangle directly to the destination rectangle.
    • SRCERASE Combines the inverted colors of the destination rectangle with the colors of the source rectangle by using the Boolean AND operator.
    • SRCINVERT Combines the colors of the source and destination rectangles by using the Boolean XOR operator.
    • SRCPAINT Combines the colors of the source and destination rectangles by using the Boolean OR operator.
    • WHITENESS Fills the destination rectangle using the color associated with index 1 in the physical palette.(This color is white for the default physical palette.)
  • DrawHDC [OPTIONAL] HDC(Handle to Device Context) pointing to an already open HDC. This is useful if a device context is to be written to many times. In this case the programmer is responsible for closing the HDC at the appropriate time.