Drawing with wxClientDC
Chris Elliott
biol75 at york.ac.uk
Mon May 19 11:28:12 PDT 2008
On 14 May 2008, at 21:03, Alejandro wrote:
> Hi,
> I'm drawing a line with a wxClientDC on a wxUpdateUIEvent,
so wxUpdateUIEvent is intended to gibe you the opportunity to change
the menus/toolbars, not to draw on the window...
> but the line flickers. This is the code of my wxUpdateUIEvent:
>
> wxClientDC *pclientdc = new wxClientDC(mywindow);
> pclientdc->DrawLine(0, coord_y, mywindow->GetSize().GetX(),
> coord_y);
> delete pclientdc;
> plist->Refresh();
Here you have just drawn on a window and then called Refresh to redraw
the window, as will normally happen in your OnPaint handler - see http://biolpc22.york.ac.uk/wx/docs/html/wx/wx_wxpaintevent.html#wxpaintevent
chris
More information about the wx-users
mailing list