mysterious behavior of wxDC in my program
Christopher Bruno
cbruno.linux at gmail.com
Mon May 26 01:12:19 PDT 2008
Here is what I am doing,
for class viewer (the canvas) class:
void Viewer:: OnPaint ( wxPaintEvent & event) {
wxBufferedPaintDC dc(this)
std::vector<ImageWrapper>::iterator iter
for(iter =3D images.begin(); iter < images.end(); iter++) {
dc.DrawBitmap((*iter).GetImage(), (*iter).GetX(), (*iter).GetY(),
true);
}
}
it works fine for < 10-15 images in the vector, but after that it causes the
program to be unable to draw bitmaps, including the window, and bitmaps on
other windows. My machine has 2 GB of RAM - so its not a system probem
im new to wxWidgets (under a year of exp) -. anyone have any idea?
On Mon, May 26, 2008 at 2:22 AM, Robert Roebling <robert at roebling.de> wrote:
>
> Christopher Bruno wrote:
> >
> > In my application I use wxDC (specifically wxPaintDC) to draw on a
> > window. Everything works fine, until after a while, nothing wants to
> > draw anymore. Bitmaps no longer show up. I try to go to print preview
> > and I get an error "Error not enough memory to show a print preview".
> > Anybody have an idea what might be the problem?
>
> A resource and/or memory leak?
>
> Robert
>
> _______________________________________________
> wx-users mailing list
> wx-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wx-users
>
-- =
Chris Bruno
n! Labs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20080526/e5c=
1d2ae/attachment.htm
More information about the wx-users
mailing list