Does anybody know what the:
part of MaskBlt does, and what the various options areCode:ByVal hbmMask As Long, ByVal xMask As Long, ByVal yMask As Long
for each one (or a sample code snippet).
Not essential, just out of curiosity.
Thanks,
Me
Printable View
Does anybody know what the:
part of MaskBlt does, and what the various options areCode:ByVal hbmMask As Long, ByVal xMask As Long, ByVal yMask As Long
for each one (or a sample code snippet).
Not essential, just out of curiosity.
Thanks,
Me
Well, I turned to Mr. Dan Appleman and I asked him...and this is what he said....
hbmMask - This is a handle to a monochrome bitmap (that's gonna be your mask). Then he goes on to telling us about the dwROP - if it has a source, it must be same size, otherwise match the destination size...
xMask/yMask - those are offsets so you can use one large bitmap with multiple masks
And just FYI - the dwROP code is nonstandard - it says to create it with the agMakeROP4 function in APIGID32.DLL --- Good luck with that 'cause this is difficult to do in VB... Why? It is very likely that there will be an overflow in the shift...
Good Luck!
But does good old Mr Appleman have some source code that
good Mr Me could use, just so I could 'play' with it and
see how it works? You see, I still dont get it: does my
app fail because I use vbSrcInvert in the dwRop part?
Thanks to anyone who can shed light on this matter,
or anyone who can give me an answer :D
Thanks, again.
And again.
And once mor for luck.
Bye!
My guess is yes - vbSrcInvert is a standard raster operation code. He specifically says that dwROP is nonstandard...nonstandard being made up of two regular raster operations: a foreground and a background code. You need to create this code with the agMakeROP4 function as previously stated... According to him, "This function shifts the background raster-op left by 8 bits then ORs in the foreground raster operation. This is difficult to do in Visual Basic due to the likelihood of an overflow during the shift." In other words - try something else! :)
You can use BitBlt and masks - create a Black and white of your source image...Black where you want the image to show through - white where you want it to be masked. Then BitBlt the mask using SRCAND - then BitBlt the source image using SRCPAINT... that should do it for you...
Good Luck!
Thanks, that's what I was looking for. I'm still very
confused my Mr Dan Appleman (couldn't he speak English? :) )
Thanks again,
Cheers,
(is a great TV show)
Me