Re: [Dev-C++] Static Control Flickers
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: w.y. <yok...@ve...> - 2003-09-06 07:06:59
|
Janos Makadi wrote:
>
> I`m working on a project (developing with dev-cpp) what measures voltage.
> Values must update every 100 milliseconds. Thats my problem. When I update
> the static controls like LTEXT and CTEXT, it flickers.
I have had a similar problem with flickering when I was using DirectDraw
to display changes in the mouse position. What I did was instead of
updating every time no matter what, save the old value in a variable,
oldValue for example. Every time you get the new value:
if ( newValue != oldValue )
{
oldValue = newValue;
... // update display
}
If the value changes frequently then you will still have
some flicker, but there will be little or no flicker otherwise.
|