网站首页  词典首页

请输入您要查询的函数:

 

术语 lookupiconidfromdirectoryex
释义 LookupIconIdFromDirectoryEx
语法:
int LookupIconIdFromDirectoryEx( PBYTE presbits,
BOOL fIcon,
int cxDesired,
int cyDesired,
UINT Flags
);
LookupIconIdFromDirectoryEx的作用
通过图标或光标LookupIconIdFromDirectoryEx搜索功能的图标或光标的数据,最适合目前的显示设备。
参数
presbits
[in]指向该图标或光标的目录数据。因为此函数没有验证的资源数据,它会导致一般性保护(GP)错误或返回一个未定义的值,如果presbits不是指向有效的资源数据。
FICON的
[的]指定是否图标或光标的要求。如果此参数为TRUE,该函数是寻找一个图标,如果该参数为FALSE,函数是一个游标搜索。
cxDesired
[in]指定所需的宽度,以像素为单位的图标。如果此参数为0,函数使用SM_CXICON或SM_CXCURSOR系统度量的价值。
cyDesired
[in]指定所需高度,以像素为单位的图标。如果此参数为0,函数使用SM_CYICON或SM_CYCURSOR系统度量的价值。

[in]指定下列值的组合:
LR_DEFAULTCOLOR
使用默认的颜色格式。
LR_MONOCHROME
创建一个单色图标或光标。
返回值
如果函数成功,返回值是一个图标或光标整数资源标识符最适合目前的显示设备。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
一种类型的资源文件RT_GROUP_ICON(RT_GROUP_CURSOR表明游标)包含的图标(或光标)在几个设备中的数据依赖和独立于设备的格式。 LookupIconIdFromDirectoryEx搜索的图标(或光标)最适合目前的显示设备资源文件并返回其整数标识符。 FindResource和FindResourceEx功能使用此标识符MAKEINTRESOURCE宏定位模块中的资源。
该图标加载目录从一个资源类型RT_GROUP_ICON(或游标RT_GROUP_CURSOR)资源文件和一个特定的图标整数资源的名称被加载。 LookupIconIdFromDirectoryEx返回一个整数标识符的图标最适合目前的显示设备资源的名称。
该LoadIcon,的LoadImage,和LoadCursor功能,使用此函数来搜索的图标或光标指定的资源数据,最适合目前的显示设备。
例如
有关示例,请参阅共享图标资源。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 4.0
UnicodeImplemented为Unicode版本。
参见
Icons Overview , CreateIconFromResourceEx , CreateIconIndirect , FindResource , FindResourceEx , GetIconInfo , LoadCursor , LoadIcon , LoadImage , LookupIconIdFromDirectory , MAKEINTRESOURCE
==英文原文==LookupIconIdFromDirectoryEx Function
The LookupIconIdFromDirectoryEx function searches through icon or cursor data for the icon or cursor that best fits the current display device.
Syntax
int LookupIconIdFromDirectoryEx( PBYTE presbits,
BOOL fIcon,
int cxDesired,
int cyDesired,
UINT Flags
);
Parameters
presbits
[in] Pointer to the icon or cursor directory data. Because this function does not validate the resource data, it causes a general protection (GP) fault or returns an undefined value if presbits is not pointing to valid resource data.
fIcon
[in] Specifies whether an icon or a cursor is sought. If this parameter is TRUE, the function is searching for an icon; if the parameter is FALSE, the function is searching for a cursor.
cxDesired
[in] Specifies the desired width, in pixels, of the icon. If this parameter is zero, the function uses the SM_CXICON or SM_CXCURSOR system metric value.
cyDesired
[in] Specifies the desired height, in pixels, of the icon. If this parameter is zero, the function uses the SM_CYICON or SM_CYCURSOR system metric value.
Flags
[in] Specifies a combination of the following values:
LR_DEFAULTCOLOR
Uses the default color format.
LR_MONOCHROME
Creates a monochrome icon or cursor.
Return Value
If the function succeeds, the return value is an integer resource identifier for the icon or cursor that best fits the current display device.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
A resource file of type RT_GROUP_ICON (RT_GROUP_CURSOR indicates cursors) contains icon (or cursor) data in several device-dependent and device-independent formats. LookupIconIdFromDirectoryEx searches the resource file for the icon (or cursor) that best fits the current display device and returns its integer identifier. The FindResource and FindResourceEx functions use the MAKEINTRESOURCE macro with this identifier to locate the resource in the module.
The icon directory is loaded from a resource file with resource type RT_GROUP_ICON (or RT_GROUP_CURSOR for cursors), and an integer resource name for the specific icon to be loaded. LookupIconIdFromDirectoryEx returns an integer identifier that is the resource name of the icon that best fits the current display device.
The LoadIcon , LoadImage , and LoadCursor functions use this function to search the specified resource data for the icon or cursor that best fits the current display device.
Example
For an example, see Sharing Icon Resources .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 4.0
UnicodeImplemented as Unicode version.
See Also
Icons Overview , CreateIconFromResourceEx , CreateIconIndirect , FindResource , FindResourceEx , GetIconInfo , LoadCursor , LoadIcon , LoadImage , LookupIconIdFromDirectory , MAKEINTRESOURCE
==原始网址==http://msdn.microsoft.com/en-us/library/ms648074(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 9:25:15