1. Debugging and bitmaps
It just struck me, after over a year and a half playing with bitmaps
and pixmaps, bitblt and stretchblt, would I be alone in thinking that
actually it would be quite cool if you could look at them when tracing
through the code in the debugger? And maybe all the attributes too, so
you might have some hint why a bitmap is not appearing on a button,
etc.
Has anybody ever seen a debugger which that sort of thing is possible
on?
Would this be remotely possible using say Al Getz's display server?
Pete
2. Re: Debugging and bitmaps
On Sat, 16 Aug 2003 02:12:31 +0000, Al Getz <Xaxo at aol.com> wrote:
>Hi Pete,
>
>Funny you should mention that, because i was thinking about that
>at one point also
>Thing is, i couldnt really justify doing it, because all it
>would do is draw a bitmap (perhaps scrollable) on the display,
>which is something some many programs like MS Paint already do.
>Any ideas how exactly it would be used and what it would help
>the user to do in debugging? Maybe you mean just to make sure
>it looks like it should before the program goes any farther
>(from a hBitmap or id_Bitmap)?
Yes, I have a complex routine which builds a bitmap in OnePage and
stretchblts it to Preview before exiting. That routine is called
several times (to paint several pages on Preview) before bitblting
Preview to the screen, which is the first time I see it. So there is
no way to step through the code waiting for it to go wrong, because
you can't see it anywhere until it's way too late.
Maybe I should just have my own debug window which I periodically
display the result so far in, scrolling it could be a problem though.
The other situation is when stretchblt or bitblt are passed bad
parameters, too wide or too long, the debugger (and ex.err) don't help
much as they only tell me OnePage is 157. (OK, I suspect it would not
prove too difficult to save the sizes used at creation, but anything
which forces you to quit the debugger, insert debug code and then try
and reproduce the problem is somewhat less than ideal.)
I have since my last post put calls to getRect(iirc) everywhere and
tracked that particular bug down that way.
Regards,
Pete
PS it was probably GetBitmapSize, not getRect