| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 394 人关注过本帖
标题:一个不懂的参数
只看楼主 加入收藏
yqfang310
Rank: 2
等 级:新手上路
威 望:4
帖 子:458
专家分:0
注 册:2006-10-10
收藏
 问题点数:0 回复次数:2 
一个不懂的参数
BITMAP BM;
m_Bitmap.LoadBitmap(IDB_BITMAP1);
m_Bitmap.GetBitmap(&BM);
其中的&BM是什么意思啊,为什么要这样啊??
搜索更多相关主题的帖子: 参数 
2007-04-05 03:29
边城路人
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:9
帖 子:591
专家分:0
注 册:2007-3-8
收藏
得分:0 
应该是获得它的地址吧,这样就可以得到位图参数了

当你开始怀疑自己时,说明你已经失去了判断力
2007-04-05 07:30
wode2008
Rank: 1
等 级:新手上路
帖 子:37
专家分:0
注 册:2007-4-3
收藏
得分:0 

BITMAP Structure
The BITMAP structure has the following form:

typedef struct tagBITMAP { /* bm */
int bmType;
int bmWidth;
int bmHeight;
int bmWidthBytes;
BYTE bmPlanes;
BYTE bmBitsPixel;
LPVOID bmBits;
} BITMAP;

The BITMAP structure defines the height, width, color format, and bit values of a logical bitmap.

Members

bmType

Specifies the bitmap type. For logical bitmaps, this member must be 0.

bmWidth

Specifies the width of the bitmap in pixels. The width must be greater than 0.

bmHeight

Specifies the height of the bitmap in raster lines. The height must be greater than 0.

bmWidthBytes

Specifies the number of bytes in each raster line. This value must be an even number since the graphics device interface (GDI) assumes that the bit values of a bitmap form an array of integer (2-byte) values. In other words, bmWidthBytes * 8 must be the next multiple of 16 greater than or equal to the value obtained when the bmWidth member is multiplied by the bmBitsPixel member.

bmPlanes

Specifies the number of color planes in the bitmap.

bmBitsPixel

Specifies the number of adjacent color bits on each plane needed to define a pixel.

bmBits

Points to the location of the bit values for the bitmap. The bmBits member must be a long pointer to an array of 1-byte values.

Comments

The currently used bitmap formats are monochrome and color. The monochrome bitmap uses a 1-bit, 1-plane format. Each scan is a multiple of 16 bits.

Scans are organized as follows for a monochrome bitmap of height n:

Scan 0
Scan 1
.
.
.
Scan n-2
Scan n-1

The pixels on a monochrome device are either black or white. If the corresponding bit in the bitmap is 1, the pixel is turned on (white). If the corresponding bit in the bitmap is 0, the pixel is turned off (black).

All devices support bitmaps that have the RC_BITBLT bit set in the RASTERCAPS index of the CDC::GetDeviceCaps member function.

Each device has its own unique color format. In order to transfer a bitmap from one device to another, use theGetDIBits andSetDIBits Windows functions.

See Also CBitmap::CreateBitmapIndirect


2007-04-05 16:47
快速回复:一个不懂的参数
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011166 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved