Drawing with wxClientDC

Alejandro ahmostovoi at gmail.com
Thu May 15 07:22:12 PDT 2008


Hi,
    I tried with your solution, but it doesn't work. I'm using a 
wxSimpleHtmlListBox and not a wxFrame like I said, I' don't know if this 
could make any difference.
Now my code is:
       wxClientDC *pclientdc = new wxClientDC(plist);
       pclientdc->DrawLine(0, coord_y, plist->GetSize().GetX(), coord_y);
       delete pclientdc;
       plist->Refresh();

where plist is a pointer to a wxSimpleHtmlListBox.
I tried, setting to the wxSimpleHtmlListBox.the background style, I 
mean, plist->SetBackgroundStyle(wxBG_STYLE_CUSTOM) and still doesn't work.

Any idea?

Regards.
Alejandro.

-------- Mensaje original --------
Asunto: Re: Drawing with wxClientDC
De: Justino Zavala <justinozavala at gmail.com>
Para: wx-users at lists.wxwidgets.org
Fecha: 14/05/2008 05:19 p.m.
> Hello,
>
> I had a similar problem some time ago and I fixed it defining an 
> EVT_ERASE_BACKGROUND on the frame and doing nothing in the called 
> function.
> Then the frame didn't draw the background and the flicker was eliminated.
>
> regards,
>
>
> Justino.
>
>
> Alejandro escribió:
>> Hi,
>>    I'm drawing a line with a wxClientDC on a wxUpdateUIEvent, 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();
>>
>> I tried with a wxBufferedDC, but it doesn't work.
>>
>> Could someone tell me how to fix it?
>>
>> Thanks
>> Alejandro
>>
>> _______________________________________________
>> wx-users mailing list
>> wx-users at lists.wxwidgets.org
>> http://lists.wxwidgets.org/mailman/listinfo/wx-users
>>
>
> _______________________________________________
> wx-users mailing list
> wx-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wx-users



More information about the wx-users mailing list