title: Can't get resource bitmap sizes using winapi
body: <p>I have an b/w bmp file. It's 8 BPP picture, size is 2048 * 2048. I create a new WTL project, go to "Resources" -> Import Bitmap -> select my bmp file -> give it <code>MYBITMAPID</code> id</p>
  
  <p>Here is the code:</p>
  
  <pre><code>HBITMAP bm = ::LoadBitmap( _Module.GetModuleInstance(), MAKEINTRESOURCE(MYBITMAPID));
  ATLASSERT(bm); // &lt;--- Ok
  
  SIZE sz;
  BOOL res = ::GetBitmapDimensionEx(bm, &amp;sz);
  ATLASSERT(res); // &lt;--- Ok
  
  ATLASSERT(sz.cx &amp;&amp; sz.cy); // &lt;--- Not Ok
  </code></pre>
  
  <p>The debugger says both sizes are 0.</p>
  
  <p>I tried</p>
  
  <pre><code>HBITMAP bm = (HBITMAP)::LoadImage( _Module.GetModuleInstance(), MAKEINTRESOURCE(MYBITMAPID), IMAGE_BITMAP, 0, 0, LR_SHARED | LR_MONOCHROME);
  </code></pre>
  
  <p>and got the same result.</p>
  
  <p>I could obtain the sizes with CBitmap class, but i would like to use winapi only for this operation.</p>
  
  <p>How can i load bitmap from resources?</p>