我有一段程序看不懂,不知道HatchBits里数值是什么意思,还有在CreateBitmap中LpBits这么设置,或者这么得到位图的的出始值呢?
..........
WORD HatchBits[10][10] = {0x0FF,0x80,0x80,0x80,0x80,0x0FF,0x08,0x08,0x08,0x08};
CBitmap bm;
bm.CreateBitmap(8,8,1,1, HatchBits);
请那位大侠指点一下。

解决方案 »

  1.   

    Pointer to an array of color data used to set the colors in a rectangle of pixels. Each scan line in the rectangle must be word aligned (scan lines that are not word aligned must be padded with zeros). If this parameter is NULL, the contents of the new bitmap is undefined. 
      

  2.   

    HatchBit就是位图数据,根据CreateBitmap的参数,应该是8x8的1位也就是单色位图,那么一般数组中的二进制1代表黑色,0代表白色。