Mood: energetic
Topic: VC++
It's real easy to retrieve the height and width of a bitmap. Trust me, take a look. CBitmap cbBmp; cbBmp.LoadBitmap(IDB_BITMAPID); BITMAP bmpInfo; //clear bmpInfo ZeroMemory(&bmpInfo, sizeof(bmpInfo)); cbBmp.GetBitmap(&bmpInfo); There is another way of going about this. Take a look: CBitmap cbBmp; cbBmp.LoadBitmap(IDB_BITMAPID); BITMAP bmpInfo; //clear bmpInfo ZeroMemory(&bmpInfo, sizeof(bmpInfo)); cbBmp.GetObject(sizeof(bmpInfo), &bmpInfo) //now get the height and width... int bmpHeight = bmpInfo.bmHeight; int bmpWidth = bmpInfo.bmWidth; See I told you it's easy.
Posted by Nibu babu thomas
at 3:48 PM
Updated: Thursday, 10 November 2005 4:48 PM