My drawing app supports the Barcode Balster printer, a black & white label
printer which features the FillBox command. A FillBox is a rectangle that
inverts the B&W color of whatever is directly underneath it. I need to
simulate the FillBox on screen for users to size & position it. It is
frequently used to put white text in a black box, or two or more of
different sizes are stacked to create a back frame.
The app must show this FillBox inversion effect and allow the user to drag
and resize FillBoxes as well. Can I take a snapshot of the form directly
underneath and invert it using CopyRect in the FillBoxes paint method? If
two or more FillBoxes overlap each would then correctly invert the prior one
(in z-order) where they overlap.
Is the bitmap of the main form (or parent) updated in memory as each object
is painted in z-order? Can my FillBox object access that bitmap with
CopyRect? This would allow each FillBox to "see" what has been painted up to
when it's own paint method is called, allowing the correct inverting of
multiple overlapped FillBoxes. Is this possible? How?
-Andy