请教 CreateDIBSection()函数的作用
子宜 2013-03-29 04:39:54 CreateDIBSection的函数申明如下:
HBITMAP CreateDIBSection(
HDC hdc, // handle to DC
CONST BITMAPINFO *pbmi, // bitmap data
UINT iUsage, // data type indicator
VOID **ppvBits, // bit values
HANDLE hSection, // handle to file mapping object
DWORD dwOffset // offset to bitmap bit values
);
对其中ppvBits的含义不太理解:
ppvBits :[out] Pointer to a variable that receives a pointer to the location of the DIB bit values.
这个函数执行过之后,ppvBits 里的数据到底是什么?个人理解是生成Bitmap文件中实际的位图数据,所以ppvBits所指空间的大小,是由头文件中biBitCount指定表示颜色时要用到的位数所确定的(1(黑白二色图), 4(16色图), 8(256色), 24(真彩色图)),这样理解对吗?