Board index » delphi » Canvas and BitBlt

Canvas and BitBlt

Hi all

In my Delphi 3.02 project, just to avoid screen flickering, I use a memory
bitmap to draw, and then I BitBlt the bitmap to the Canvas. It works fine,
but ...

When launching the program from the IDE, sometimes I get a GP fault from the
video driver (is a matrox mystique 220 card), and Windows-95 hangs. It
happens randomly.

I can't figure what's going on, but I suspect that the BitBlt call is
interfering whith the Delphi canvas procesing in some way. Also, it seems to
me (but I'm unsure...) that the "hint" windows are part of the problem.

In any case, ... is safe to mix normal Canvas calls with BitBlt operations
in Delphi 3 ?

Thanks

 

Re:Canvas and BitBlt


Quote
Lluis Olle wrote:
> In any case, ... is safe to mix normal Canvas calls
> with BitBlt operations in Delphi 3 ?

Yes. FWIW, I grab the canvas.handle and stuff it
into a variable and use the variable to make
several consecutive calls to the gdi. Note
that once you use a canvas property or method
(depending upon what you do), that variable may
be toast after the call. If your using a bunch
of canvas calls and only a single bitblt, then
your better off just using on of the canvas
methods to copy between canvases instead of bitblt.

Joe
--
Joe C. Hecht
http://home1.gte.net/joehecht/index.htm

Other Threads