Results 1 to 5 of 5

Thread: MaskBlt

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Question

    Does anybody know what the:
    Code:
    ByVal hbmMask As Long, ByVal xMask As Long, ByVal yMask As Long
    part of MaskBlt does, and what the various options are
    for each one (or a sample code snippet).

    Not essential, just out of curiosity.

    Thanks,

    Me
    Courgettes.

  2. #2
    Junior Member
    Join Date
    Mar 1999
    Posts
    27
    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!

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Smile Thanks, Cougar

    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

    Thanks, again.

    And again.

    And once mor for luck.

    Bye!

    Courgettes.

  4. #4
    Junior Member
    Join Date
    Mar 1999
    Posts
    27
    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!

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Thumbs up Thanks

    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
    Courgettes.

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