troubleshooting Question

copy a BitMap with BitBlt .....

Avatar of BdLm
BdLmFlag for Germany asked on
4 Comments1 Solution6986 ViewsLast Modified:
I Need a Bitmap with a empty frame,
why does my call of the BitBlt function not work, I can't see my bug .....
 *    Copy a Source BiMap into a TargetBitMap
 *    The TargetBitBap should a have a Frame of  X - Y   Pixels Size
procedure  CreateBitmapFrame(SourceBMP,  TargetBMP :  TBitMap; FrameX, FrameY : Integer; FrameColor : TColor);
     TargetBMP.Height := SourceBMP.Height + 2 * FrameY;
     TargetBMP.Width := SourceBMP.Width + 2 * FrameX;
   BOOL BitBlt(
      HDC hdcDest, // handle to destination DC
      int nXDest,  // x-coord of destination upper-left corner
      int nYDest,  // y-coord of destination upper-left corner
      int nWidth,  // width of destination rectangle
      int nHeight, // height of destination rectangle
      HDC hdcSrc,  // handle to source DC
      int nXSrc,   // x-coordinate of source upper-left corner
      int nYSrc,   // y-coordinate of source upper-left corner
      DWORD dwRop  // raster operation code
     BitBlt(TargetBMP.Handle, FrameX, FrameY, SourceBMP.Width, SourceBMP.Height, SourceBMP.Handle, 0,  0, SRCCOPY);
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros