Hello,
at the moment I am trying to develop a small Wordclock simulator. I started creating a frame based Application.
The window should be refreshed every second. The problem is that I have a lot of flicker on Windows. On Linux its working great.
I also took a look inside the wxWiki https://wiki.wxwidgets.org/Flicker-Free_Drawing but that was not helpful at all.
I am using wxWidgets-3.0.3 and Windows 7
Is there something else what can be done?
Thanks for help!
Best regards Andreas
Flicker on Windows
-
- In need of some credit
- Posts: 9
- Joined: Fri Aug 11, 2017 8:08 am
Flicker on Windows
- Attachments
-
- testMain.h
- (917 Bytes) Downloaded 70 times
-
- testMain.cpp
- (3.25 KiB) Downloaded 77 times
Last edited by theAndreas on Fri Aug 11, 2017 12:55 pm, edited 1 time in total.
Re: Flicker on Windows
Do you get only flicker when you resize the frame or on every refresh?
I tested it under Window7 and i only get flicker on resize - which will be hard to avoid when using standard controls for the display.
To avoid flicker 100% you'll have to avoid the use of standard controls and use a panel with custom drawing instead. Depending on what features you might want to add, that's probably the most flexible solution anyway.
I tested it under Window7 and i only get flicker on resize - which will be hard to avoid when using standard controls for the display.
To avoid flicker 100% you'll have to avoid the use of standard controls and use a panel with custom drawing instead. Depending on what features you might want to add, that's probably the most flexible solution anyway.
Use the source, Luke!
-
- In need of some credit
- Posts: 9
- Joined: Fri Aug 11, 2017 8:08 am
Re: Flicker on Windows
I get flicker on every refresh. Could you please try to set the Timer to a smaller value maybe 100. Then the flicker should get stronger.
Flicker on resize is not so a big problem. But flicker on every refresh is really ugly.
I already have read some posts about the problem with the standard controls. That's a pity because I really like wxWidgets, but that's not so nice. I hope this will be fixed in the next releases.
Flicker on resize is not so a big problem. But flicker on every refresh is really ugly.
I already have read some posts about the problem with the standard controls. That's a pity because I really like wxWidgets, but that's not so nice. I hope this will be fixed in the next releases.
Re: Flicker on Windows
No flicker for me on any refresh rate. Could be because i have Aero switched off.Could you please try to set the Timer to a smaller value maybe 100. Then the flicker should get stronger.
This is very unlikely to change, it's a conceptional problem.That's a pity because I really like wxWidgets, but that's not so nice. I hope this will be fixed in the next releases.
Can you try calling SetDoubleBuffered(true) on the frame?
Use the source, Luke!
-
- In need of some credit
- Posts: 9
- Joined: Fri Aug 11, 2017 8:08 am
Re: Flicker on Windows
Thanks for the tip. This is really interesting: After adding SetDoubleBuffered the flicker is gone. But as soon as I change the size of the window, the flicker appears again on every refresh. But why?Can you try calling SetDoubleBuffered(true) on the frame?
Turned off Aero and also no flicker any more . Seems to me its the only helpful option.
- Attachments
-
- testMain.cpp
- (3.29 KiB) Downloaded 104 times