MFC CBitmap Class

To use a CBitmap object, construct the object, attach a bitmap handle to it with one of the initialization member functions, and then call the object’s member functions. 【要使用CBitmap对象,请构造该对象,使用一个初始化成员函数为其附加位图句柄,然后调用该对象的成员函数。】

Base Class Members(基类成员)

CObject Members
CGdiObject Members

Construction(构造)

CBitmapConstructs a CBitmap object.【构造CBitmap对象。】

Initialization(初始化)

CreateBitmapInitializes the object with a device-dependent memory bitmap that has a specified width, height, and bit pattern. 【使用具有指定宽度、高度和位模式的设备相关内存位图初始化对象。】
CreateBitmapIndirectInitializes the object with a bitmap with the width, height, and bit pattern (if one is specified) given in a BITMAP structure. 【使用位图初始化对象,位图的宽度、高度和位模式(如果指定)在位图结构中给定。】
CreateCompatibleBitmapInitializes the object with a bitmap so that it is compatible with a specified device. 【用位图初始化对象,使其与指定的设备兼容。】
CreateDiscardableBitmapInitializes the object with a discardable bitmap that is compatible with a specified device. 【使用与指定设备兼容的可丢弃位图初始化对象。】
LoadBitmap Initializes the object by loading a named bitmap resource from the application’s executable file and attaching the bitmap to the object. 【通过从应用程序的可执行文件加载命名位图资源并将位图附加到对象来初始化对象。】
LoadMappedBitmap Loads a bitmap and maps colors to current system colors. 【加载位图并将颜色映射到当前系统颜色。】
LoadOEMBitmap Initializes the object by loading a predefined Windows bitmap and attaching the bitmap to the object. 【通过加载预定义的Windows位图并将位图附加到对象来初始化对象。】

Attributes(属性)

GetBitmap Fills a BITMAP structure with information about the bitmap. 【用有关位图的信息填充位图结构。】
operator HBITMAPReturns the Windows handle attached to the CBitmap object. 【返回附加到CBitmap对象的Windows句柄。】

Operations(操作)

FromHandle Returns a pointer to a CBitmap object when given a handle to a Windows HBITMAP bitmap. 【当给定Windows HBITMAP位图的句柄时,返回指向CBitmap对象的指针。】
GetBitmapBits Copies the bits of the specified bitmap into the specified buffer. 【将指定位图的位复制到指定的缓冲区。】
GetBitmapDimension Returns the width and height of the bitmap. The height and width are assumed to have been set previously by the SetBitmapDimension member function. 【返回位图的宽度和高度。假定高度和宽度先前已由SetBitmapDimension成员函数设置。】
SetBitmapBits Sets the bits of a bitmap to the specified bit values. 【将位图的位设置为指定的位值。】
SetBitmapDimension Assigns a width and height to a bitmap in 0.1-millimeter units. 【以0.1毫米为单位为位图指定宽度和高度。】

心得体会

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值