wxGTK (linux) works as a charm but extreme flickering in wxMSW (windows)

wxGTK (linux) works as a charm but extreme flickering in wxMSW (windows)

Post by tomm » Sun, 05 Feb 2006 09:03:47



Hi,
I'm writing a graph derived from wxWindow.
It's placed in a wxFlexGridSizer in a wxFrame
I catch the onpaint event and do my thing.
It works as a charm on GTK/LINUX
but when I compile and run in windows I get this annoying flickering..
reddish colour getting through from the parents background.
First I thought it was because of all the operations I was performing. but nope. removed all the operations and just caught the onpaint ..

in there I have wxPaintDC dc(this); and that's basically it , I set background colour and do a dc.Clear()

and still the flickering.. I even tried with wxBufferedPaintDC() but the flickering is even more intense with this one :/

So, any suggestions ?
I also tried with BeginDrawing EndDrawing, but considering it flickers even though I'm not doing anything, I'm sceptic.
Something to pass to the parent class or something ?

Tommy Wallberg
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1528" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV
style="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 4px; PADDING-TOP: 4px"><SPAN
class=postbody>Hi, <BR>I'm writing a graph derived from wxWindow. <BR>It's
placed in a wxFlexGridSizer in a wxFrame <BR>I catch the onpaint event and do my
thing. <BR>It works as a charm on GTK/LINUX <BR>but when I compile and run in
windows I get this annoying flickering.. <BR>reddish colour getting through from
the parents background. <BR>First I thought it was because of all the operations
I was performing. but nope. removed all the operations and just caught the
onpaint .. <BR><BR>in there I have wxPaintDC dc(this); and that's basically it ,
I set background colour and do a dc.Clear() <BR><BR>and still the flickering.. I
even tried with wxBufferedPaintDC() but the flickering is even more intense with
this one :/ <BR><BR>So, any suggestions ? <BR>I also tried with BeginDrawing
EndDrawing, but considering it flickers even though I'm not doing anything, I'm
sceptic. <BR>Something to pass to the parent class or something ? <BR><BR>Tommy
Wallberg</SPAN></DIV></FONT></DIV></BODY></HTML>
 
 
 

wxGTK (linux) works as a charm but extreme flickering in wxMSW (windows)

Post by Andreas Mi » Sun, 05 Feb 2006 09:11:18


Maybe it helps if you handle the EVT_ERASE_BACKGROUND event.
Just my little thoughts...

Greetings,
Andreas

 
 
 

wxGTK (linux) works as a charm but extreme flickering in wxMSW (windows)

Post by tomm » Sun, 05 Feb 2006 09:41:59

>

the

Yeah, it worked. Thanks for the quick reply :)


---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM
 
 
 

wxGTK (linux) works as a charm but extreme flickering in wxMSW (windows)

Post by list » Sun, 05 Feb 2006 18:29:21


Tommy> but when I compile and run in windows I get this annoying flickering..

I also had weird results with regular bitmap widgets under Windows with wx 2.6.2. (No problem under GTK+.)

The solution was to place everything onto a panel. I had to do that once before under Windows, I think it was even using a Notebook. So, first a panel and then the other widgets on top of that. Take the panel away and things get placed oddly and graphics are only partially displayed and other strange behaviour.

Marcus


---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM