Guidance Forums / wxWidgets (wxWindows) in C++ / wxDC: repeated blitting....

Search 搜索
Home Home

Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. wxDC: repeated blitting....
Posted by: 2004-01-10 17:36:52

I am working on an image processing project where I try to change the size of an artifact in the image using a slider position. I blit the wxClientDC evrytime I have to change the image size. All this works fine but after some scrolls of the slider, the display refuses to update!! Even the wxIdleEvent is not processed after that!!

Does anyone out there have an idea as to how to fix this problem??


Siva Chandra
Message2. Re: wxDC: repeated blitting....
Posted by: KaReL 2004-01-11 12:20:43
Is it always on default times it stops? I mean like 5 times scrolling with the bar or so?

Is it possible to retrace the problem into the wxWindows source itself (I would say set a trigger on the sliding-event?).

For the rest I don't know why it has that behaviour...

Message3. Re: wxDC: repeated blitting....
Posted by: upCASE 2004-01-11 18:50:41
I'd suggest two things you may try:
1. Use wxPaintDC instead of wxClientDC. Write you own "canvas" by deriving it from wxPanel and set a Paint() method for it that draws on a wxPaintDC.
2. Use a wxStaticBitmap and change it's size. I wrote a small tool to generate HTML galeries and used this method for setting the size of the thumbnails. I used a slider, too and it works.

If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
© Fri 2022-12-9  Guidance Laboratory Inc. Hits:0