Results 1 to 5 of 5

Thread: Adding 2 bitmaps together

  1. #1

    Thread Starter
    Addicted Member VB6Coder's Avatar
    Join Date
    Apr 2001
    Location
    Northampton, UK
    Posts
    185

    Question Adding 2 bitmaps together

    I've got two bitmaps in an image list control, and I need to add them together to create one bitmap. This bitmap will then be used to set the MaskPicture property of a user control. I can't use the Overlay method of the Image List control as the bitmap positions could change.

    How do I add two bitmaps together to make one bitmap and still keep it as a Picture object?

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Use the BitBlt api call

  3. #3

    Thread Starter
    Addicted Member VB6Coder's Avatar
    Join Date
    Apr 2001
    Location
    Northampton, UK
    Posts
    185
    BitBlt draws the bitmaps onto a DC. How do I get a handle to the bitmap on the DC, so I can use it with the OleCreatePictureIndirect API to get a Picture object?

  4. #4
    Megatron
    Guest
    Well, once it's draw on the DC, you can access it from the Image property. If you want to access it from the Picture then simply set the Picture to the Image.
    Code:
    Picture1.Picture = Picture1.Image

  5. #5
    Megatron
    Guest
    Also, don't forget to refresh your graphics (Picture1.Refresh), otherwise they will not show.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width