title: wxpython, dc.GetAsBitmap returns an invalid bitmap
body: <p>I am trying to get a bitmap of what my dc draws, but when I convert it to Image I get</p>
  
  <pre><code>  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line 618, in ConvertToImage
      return _gdi_.Bitmap_ConvertToImage(*args, **kwargs)
  wx._core.PyAssertionError: C++ assertion "bmp.Ok()" failed at ..\..\src\msw\dib.cpp(148) in wxDIB::Create(): wxDIB::Create(): invalid bitmap
  </code></pre>
  
  <p>It also gives the same error when trying to draw said bitmap to another dc. So I remember reading around here about a way to store the drawings of a ClientDC into a MemoryDC to then clean the ClientDC and draw the contents of the MemoryDC back onto it. What's the way to do that?</p>