Firstly, sorry about starting a thread for this, i know this sort of thing has been answered many times, but i just can not get it to work.


I'm making an tile based game editor. I'm currently bitblting the pictures on to the form, then using SRCAND to overlay the current object to place (which follows the cursor, and only changes the 'map' when the user clicks.

Instead of blending the images together i want to overlay the current object on top of the form.

As i already had all the SRCAND bitblt commands set up correctly, i decided to make a sub that instead of doing and, did a mask & picture.

Here is the Sub i'm using:

VB Code:
  1. Public Sub MskBlt(DestDC, X, Y, Width, Height, SrcDC)
  2.     BitBlt DestDC, X, Y, Width, Height, SrcDC, Width, 0, SRCPAINT
  3.     BitBlt DestDC, X, Y, Width, Height, SrcDC, 0, 0, SRCAND
  4. End Sub

All the parameters are the same as the ones i used for bitblt (which worked), except the last 3, which arn't needed any more.


The trouble is that this still blends the pictures together instead of overlaying them. What have i don't wrong?


Thanks for any replies.