title: why wxScreenDC get black screen
body: <p>Does anyone know why <strong>wxScreenDC</strong> only get <strong>black screen</strong> when Blit to a wxMemoryDC.<br />
  I'm using Debian system with <em><strong>wxWidgets v3.1.5(or v3.1.6)</strong></em><br />
  Same code, replace <strong>wxScreenDC</strong> with <strong>wxWindowDC</strong> everything go fine.<br />
  This is my code:<br /></p>
  <pre><code>void MyFrame::OnCapture(wxCommandEvent &amp;event)
  {
      wxFileDialog dlg(this, _(&quot;Save PNG file&quot;), &quot;&quot;, &quot;&quot;,
                         &quot;PNG files (*.png)|*.png&quot;, wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
  
      if (dlg.ShowModal() == wxID_CANCEL)return;
  
      wxScreenDC dc;
  //  wxWindowDC dc(this);
      wxSize sz = dc.GetSize();
      wxBitmap bmp(sz.x, sz.y);
  
      wxMemoryDC memDC;
      memDC.SelectObject(bmp);
      memDC.Blit(0, 0, sz.x, sz.y, &amp;dc, 0, 0);
      memDC.SelectObject(wxNullBitmap);
      bmp.SaveFile(dlg.GetPath(), wxBITMAP_TYPE_PNG);
  }
  </code></pre>