Re: Problem in wxBitmap and wxStaticBitmap

Robert Roebling <[email protected]> Mon, 03 Oct 2005 23:33:15 +0200
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <[email protected]>
Roger Zavala wrote:

> wx.MemoryDC myClientDC        = new wx.MemoryDC();
> 
> wx.Bitmap        b                      =  new wx.Bitmap(400, 400);
> 
> myClientDC.SelectObject( b );
> 
> myClientDC.Clear();
> 
> myClientDC.Pen                       = new wx.Pen( wx.Colour.wxBLACK,
> 2, wx.FillStyle.wxDEFAULT);
> 
> myClientDC.Brush                     = new wx.Brush( wx.Colour.wxCYAN,
> wx.FillStyle.wxSOLID );
> 
> myClientDC.DrawRectangle( 10, 10, 200, 200 );
> 
> myClientDC.Dispose();
> 
> this.myStaticBitmap                  = new wx.StaticBitmap ( this, -1,
> b);
>
> In the new version, the same code don't display de bitmap on the
> StaticBitmap,

No idea what "old" and "new" means and what version and what
platform you are using, but you might have to unselect the
bitmap "b" from the wxMemoryDC by calling SelectObject with
a wxNullBitmap.

  Robert



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl