How to get size of CBitmap ?

After you Load an bitmap image into CBitmap, you can use this code to get its size.

      CBitmap bmp;
      bmp.LoadBitmap( /*Load bitmap*/ );
      BITMAP BmpInfo;
      bmp.GetBitmap(&BmpInfo);

      int iWidth = BmpInfo.bmWidth;
int iHeight = BmpInfo.bmHeight;

Your Reply