网站首页  词典首页

请输入您要查询的函数:

 

术语 createdibitmap
释义 CreateDIBitmap
语法:
HBITMAP CreateDIBitmap(
__in HDC hdc,
__in const BITMAPINFOHEADER *lpbmih,
__in DWORD fdwInit,
__in const VOID *lpbInit,
__in const BITMAPINFO *lpbmi,
__in UINT fuUsage
);
CreateDIBitmap函数
CreateDIBitmap函数创建的,从兼容的DIB位图(DDB)和可选设置位图位。
参数
hdc [in]
一个句柄,设备上下文。
lpbmih [in]
阿位图信息头结构,指针可能在下面的表中所示的一个。有关更多信息,请参阅BITMAPV5HEADER。
如果fdwInit是CBM_INIT,该函数使用位图信息头结构,以获得所需的宽度和高度的位图以及其他信息。请注意,一个高度正值表示一种自下而上的DIB而高度为负值表明自上而下的DIB。调用与fdwInit CreateDIBitmap作为CBM_INIT相当于调用CreateCompatibleBitmap函数来创建设备的分布式数据库格式,然后调用SetDIBits翻译功能DIB位的联苯双酯。
fdwInit [in]
指定系统如何初始化位图位。下面的值定义。
ValueMeaning
CBM_INITIf这标志设置,系统使用的数据指出,由lpbInit和lpbmi参数初始化位图位。
如果此标志清晰,数据显示这些参数没有使用。
如果fdwInit是零,系统不初始化位图位。
lpbInit [in]
对一个含有初始位图数据的字节数组的指针。数据的格式取决于BITMAPINFO结构biBitCount成员而lpbmi参数点。
lpbmi [in]
一个BITMAPINFO结构中描述的尺寸和颜色数组格式的指针指向的lpbInit参数。
fuUsage [in]
指定是否BITMAPINFO结构的成员bmiColors被初始化,如果有的话,是否包含了明确的bmiColors红,绿,蓝(RGB)值或调色板索引。该fuUsage参数必须是下列值之一。
ValueMeaning
DIB_PAL_COLORSA提供色表和一组16包括进入设备的断章取义,把位图是被选中的逻辑调色板位索引。
DIB_RGB_COLORSA颜色表提供,并包含文字RGB值。
返回值
如果函数成功,返回值是一个句柄兼容位图。
如果函数失败,返回值为NULL。
备注
在创建的将是什么位深度您参考DC是联苯双酯。要创建一个位图,不同位深度是,使用CreateDIBSection。
为设备达到最佳的位图绘图速度,指定CBM_INIT fdwInit。然后,使用视频模式相同的颜色深度的DIB。当视频正在运行4 -或8 - bpp的,使用DIB_PAL_COLORS。
为fdwInit参数CBM_CREATDIB标志不再支持。
当您不再需要的位图,调用DeleteObject函数将其删除。
ICM的:没有色彩管理是执行。由此产生的位图的内容不匹配的颜色位图后,已创建。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
位图概述
位图功能
位图信息
BITMAPINFO
CreateCompatibleBitmap
CreateDIBSection
DeleteObject
GetDeviceCaps
GetSystemPaletteEntries
SelectObject
SetDIBits
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==CreateDIBitmap Function
The CreateDIBitmap function creates a compatible bitmap (DDB) from a DIB and, optionally, sets the bitmap bits.
Syntax
HBITMAP CreateDIBitmap(
__in HDC hdc,
__in const BITMAPINFOHEADER *lpbmih,
__in DWORD fdwInit,
__in const VOID *lpbInit,
__in const BITMAPINFO *lpbmi,
__in UINT fuUsage
);
Parameters
hdc [in]
A handle to a device context.
lpbmih [in]
A pointer to a bitmap information header structure, which may be one of those shown in the following table. For more information, see BITMAPV5HEADER .
If fdwInit is CBM_INIT, the function uses the bitmap information header structure to obtain the desired width and height of the bitmap as well as other information. Note that a positive value for the height indicates a bottom-up DIB while a negative value for the height indicates a top-down DIB. Calling CreateDIBitmap with fdwInit as CBM_INIT is equivalent to calling the CreateCompatibleBitmap function to create a DDB in the format of the device and then calling the SetDIBits function to translate the DIB bits to the DDB.
fdwInit [in]
Specifies how the system initializes the bitmap bits. The following value is defined.
ValueMeaning
CBM_INITIf this flag is set, the system uses the data pointed to by the lpbInit and lpbmi parameters to initialize the bitmap bits.
If this flag is clear, the data pointed to by those parameters is not used.

If fdwInit is zero, the system does not initialize the bitmap bits.
lpbInit [in]
A pointer to an array of bytes containing the initial bitmap data. The format of the data depends on the biBitCount member of the BITMAPINFO structure to which the lpbmi parameter points.
lpbmi [in]
A pointer to a BITMAPINFO structure that describes the dimensions and color format of the array pointed to by the lpbInit parameter.
fuUsage [in]
Specifies whether the bmiColors member of the BITMAPINFO structure was initialized and, if so, whether bmiColors contains explicit red, green, blue (RGB) values or palette indexes. The fuUsage parameter must be one of the following values.
ValueMeaning
DIB_PAL_COLORSA color table is provided and consists of an array of 16-bit indexes into the logical palette of the device context into which the bitmap is to be selected.
DIB_RGB_COLORSA color table is provided and contains literal RGB values.

Return Value
If the function succeeds, the return value is a handle to the compatible bitmap.
If the function fails, the return value is NULL.
Remarks
The DDB that is created will be whatever bit depth your reference DC is. To create a bitmap that is of different bit depth, use CreateDIBSection .
For a device to reach optimal bitmap-drawing speed, specify fdwInit as CBM_INIT. Then, use the same color depth DIB as the video mode. When the video is running 4- or 8-bpp, use DIB_PAL_COLORS.
The CBM_CREATDIB flag for the fdwInit parameter is no longer supported.
When you no longer need the bitmap, call the DeleteObject function to delete it.
ICM: No color management is performed. The contents of the resulting bitmap are not color matched after the bitmap has been created.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Bitmaps Overview
Bitmap Functions
BITMAPINFOHEADER
BITMAPINFO
CreateCompatibleBitmap
CreateDIBSection
DeleteObject
GetDeviceCaps
GetSystemPaletteEntries
SelectObject
SetDIBits
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd183491(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:20:36