DMTrump
asked on
StretchBlt difficulty with forms with TransparentColor = True
I am using the StretchBlt windows function to create a magnifier that follows the mouse in one of my applications, However it does not "see" a Delphi form that has the TransparentColor property set to true.
I discovered long ago that when using BitBlt to take a screenshot I had to combine SCRCOPY with CAPTUREBLT ($4000000) like so: SRCCOPY or CAPTUREBLT in order to "see" such forms in my screenshot.
BitBlt(DestBitmap.Canvas.H andle, 0, 0, DestBitmap.Width, DestBitmap.Height, DC, ox, oy, SRCCOPY or CAPTUREBLT);
(That sees forms with TransparentColor=True)
However doing that with StretchBlt does not have the same effect:
StretchBlt(Canvas.Handle, 0, 0, Width, Height, FDC,
P.X, P.Y, SrcWidth, SrcHeight, SRCCOPY or CAPTUREBLT);
Does not see forms with TransparentColor = true.
Any suggestions on how to make that work? Wheat I need to be able to do is see the portion of the form or of an image on the form that is in a color <other> than the defined transparent color.
I discovered long ago that when using BitBlt to take a screenshot I had to combine SCRCOPY with CAPTUREBLT ($4000000) like so: SRCCOPY or CAPTUREBLT in order to "see" such forms in my screenshot.
BitBlt(DestBitmap.Canvas.H
(That sees forms with TransparentColor=True)
However doing that with StretchBlt does not have the same effect:
StretchBlt(Canvas.Handle, 0, 0, Width, Height, FDC,
P.X, P.Y, SrcWidth, SrcHeight, SRCCOPY or CAPTUREBLT);
Does not see forms with TransparentColor = true.
Any suggestions on how to make that work? Wheat I need to be able to do is see the portion of the form or of an image on the form that is in a color <other> than the defined transparent color.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'd still be glad to here a better solution than the one I arrived at and will award the remaining 450 points for it Meanwhile, if anyone arrives here looking for a solution to the problem I posed - my method DOES work <BG>
ASKER
I gave 50 points to jimyX for at least trying to help - even though I figured out an acceptable solution on my own.
My solution may not be the only one or the best one but it works.
My solution may not be the only one or the best one but it works.
ASKER
SRCCAND is not recognized.