CBitmap bitmap;
bitmap.LoadBitmap(IDB_BITMAP3); //load resource
BITMAP bmp;
bitmap.GetBitmap(&bmp);
const int nWidth = bmp.bmWidth; //width
const int nHeight = bmp.bmHeight; //height
本文介绍了一种使用 CBitmap 类从资源文件中加载位图的方法,并获取位图的宽度和高度。通过 LoadBitmap 函数加载资源,然后利用 GetBitmap 函数获取 BITMAP 结构来读取位图的具体尺寸。
CBitmap bitmap;
bitmap.LoadBitmap(IDB_BITMAP3); //load resource
BITMAP bmp;
bitmap.GetBitmap(&bmp);
const int nWidth = bmp.bmWidth; //width
const int nHeight = bmp.bmHeight; //height
被折叠的 条评论
为什么被折叠?
