copy a wxDC to wxScrolledWindow

Piotr Starczewski pstarczewski at o2.pl
Mon Dec 4 04:20:25 PST 2006


Could you explain more about your problem or place some source? Sorry, I 
have hard time understanding you.

If you have derived a wxScrolledWindow class and you want to duplicate 
other window dc into your derived class you can do it with wxDC::Blit(...).

If you want just to draw on your window (not duplicate other window dc) 
then you can create (remember to add EVT_PAINT to your event table):
void YourClass::OnDraw(wxPaintEvent &evt)
{
    wxPaintDC dc(this);
    // do your drawing
    ...
}

Regards,
Peter

Miguel Cartagena wrote:
> I try this, but not works.
>
>
> The question is that I have one wxDC inside my class that extends
> wxScrolledWindow. Then as I must (or I don't) rewrite OnDraw method for
> the DC of my class draw the same content of the original DC.
>
>
> On Dec 4, 8:54 am, pstarczew... at o2.pl (Piotr Starczewski) wrote:
>   
>> Try this:http://wxwidgets.org/manuals/2.6.3/wx_wxdc.html#wxdcblit
>>
>> It should copy whole source dc to your destination dc.
>>
>> Regards,
>> Peter
>>
>>
>>
>> Miguel Cartagena wrote:
>>     
>>> Hello,
>>>       
>>> In my application I receive one wxDC and have to reproduce it in one
>>> wxScrolledWindow. How I can copy this wxDC for mine wxScrolledWindow?
>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: wx-users-unsubscr... at lists.wxwidgets.org
>>> For additional commands, e-mail: wx-users-h... at lists.wxwidgets.org---------------------------------------------------------------------
>>>       
>> To unsubscribe, e-mail: wx-users-unsubscr... at lists.wxwidgets.org
>> For additional commands, e-mail: wx-users-h... at lists.wxwidgets.org
>>     
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
>
>
>   




More information about the wx-users mailing list