网站首页  词典首页

请输入您要查询的函数:

 

术语 createicon
释义 CreateIcon
语法:
HICON CreateIcon( HINSTANCE hInstance,
int nWidth,
int nHeight,
BYTE cPlanes,
BYTE cBitsPixel,
const BYTE *lpbANDbits,
const BYTE *lpbXORbits
);
CreateIcon功能
该CreateIcon函数创建的图标具有指定的大小,颜色和位模式。
参数
hInstance
[in]句柄的创建该图标的模块实例。
nWidth
[in]指定的宽度,以像素为单位的图标。
nHeight
[in]指定的高度,以像素为单位的图标。
cPlanes
[in]指定飞机在图标的异数位掩码。
cBitsPixel
[in]指定位每在图标的异或掩码像素数。
lpbANDbits
[in]指向一个字节数组,包含位值的和掩码的图标。这掩码描述了一个单色位图。
lpbXORbits
[in]指向一个字节数组,包含图标的异或掩码的位值。这掩码描述了单色或设备依赖色位图。
返回值
如果函数成功,返回值是一个句柄的图标。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
在nWidth和nHeight参数必须指定宽度和当前的显示驱动程序支持的高度,因为系统无法创建其他大小的图标。要确定的宽度和高度显示驱动支持,使用GetSystemMetrics函数,指定SM_CXICON或SM_CYICON价值。
CreateIcon适用于以下事实表中与和XOR位掩码:
与bitmaskXOR bitmaskDisplay
00Black
01White
10Screen
11Reverse屏幕
当您使用完的图标,摧毁它使用DestroyIcon函数。
例如
有关示例,请参阅创建图标。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
图标概述,GetSystemMetrics
==英文原文==CreateIcon Function
The CreateIcon function creates an icon that has the specified size, colors, and bit patterns.
Syntax
HICON CreateIcon( HINSTANCE hInstance,
int nWidth,
int nHeight,
BYTE cPlanes,
BYTE cBitsPixel,
const BYTE *lpbANDbits,
const BYTE *lpbXORbits
);
Parameters
hInstance
[in] Handle to the instance of the module creating the icon.
nWidth
[in] Specifies the width, in pixels, of the icon.
nHeight
[in] Specifies the height, in pixels, of the icon.
cPlanes
[in] Specifies the number of planes in the XOR bitmask of the icon.
cBitsPixel
[in] Specifies the number of bits-per-pixel in the XOR bitmask of the icon.
lpbANDbits
[in] Pointer to an array of bytes that contains the bit values for the AND bitmask of the icon. This bitmask describes a monochrome bitmap.
lpbXORbits
[in] Pointer to an array of bytes that contains the bit values for the XOR bitmask of the icon. This bitmask describes a monochrome or device-dependent color bitmap.
Return Value
If the function succeeds, the return value is a handle to an icon.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
The nWidth and nHeight parameters must specify a width and height supported by the current display driver, because the system cannot create icons of other sizes. To determine the width and height supported by the display driver, use the GetSystemMetrics function, specifying the SM_CXICON or SM_CYICON value.
CreateIcon applies the following truth table to the AND and XOR bitmasks:
AND bitmaskXOR bitmaskDisplay
00Black
01White
10Screen
11Reverse screen
When you are finished using the icon, destroy it using the DestroyIcon function.
Example
For an example, see Creating an Icon .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as Unicode version.
See Also
Icons Overview , GetSystemMetrics
==原始网址==http://msdn.microsoft.com/en-us/library/ms648059(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:15