A method to ask for repaint() asynchronously like Java?


A method to ask for repaint() asynchronously like Java “invalidate()” ?

To call for repaint(), even with mmLock, is not subtle enough for my project.

I’d like to tell the main messagemanager : “this component should be repainted.”

I try trough “setVisible()”, it works but I guess you have something better for.



eh? That’s exactly what repaint already does, isn’t it?


Yeah ! But repaint() seems to be too heavy for the Main graphic thread, dont you think so ?

Well, here is a snapshot of a part of my soft, this is boxes, with a time progress bar.
When progresssbar ends, a “v” appears on the box. Box needs to be repainted to do so.

But, look, sometimes the progressbar stops the repainting, and at the end of the box there should be a repaint but it is not.

I m using 'mmLock then repaint()" to do so.

  • i have created a timer to go with time like in any sequencer… The progressbar are progressing one by one thanks to the timer.

  • i have an engine thread, that callbacks my app each time a box is finished and tell her ‘mmLock & repaint()’

One is freezing…


I don’t understand what you’re asking… repaint() is very clearly explained in the comments, and it sounds like you need to do a bit more reading and thinking to get a grip on how it all works.


Huh… actually i should [quote]void Component::repaint ( ) throw ()

Marks the whole component as needing to be redrawn.

Calling this will not do any repainting immediately, but will mark the component as ‘dirty’.[/quote]

I just need repaint…

ok, thank you.