title: How to create a very big bitmap in C++/MFC / GDI
body: <p>I'd like to be able to create a large (say 20,000 x 20,000) pixel bitmap in a C++ MFC application, using a CDC derived class to write to the bitmap.  I've tried using memory DCs as described in the MSDN docs, but these appear to be restricted to sizes compatible with the current display driver.</p>
  
  <p>I'm currently using a bitmap print driver to do the job, but it is extremely slow and uses very large amounts of intermediate storage due to spooling GDI information.</p>
  
  <p>The solution I'm looking for should not involve metafiles or spooling, as the model that I am drawing takes many millions of GDI calls to render.</p>
  
  <p>I could use a divide and conquer approach via multiple memory DCs, but it seems like a pretty cumborsome and inelegant technique.</p>
  
  <p>any thoughts?</p>