网站首页  词典首页

请输入您要查询的函数:

 

术语 loadicon
释义 LoadIcon
语法:
HICON LoadIcon( HINSTANCE hInstance,
LPCTSTR lpIconName
);
LoadIcon函数
该LoadIcon函数加载的可执行(。exe指定的图标资源)文件与一个应用程序实例。
注意:此功能谷被取代的LoadImage函数。
参数
hInstance
[in]句柄的模块的实例包含可执行文件图标加载。此参数必须为NULL标准图标时,正在加载。
lpIconName
[in]
指向一个以NULL结尾的字符串,其中包含的图标资源的名称被加载。另外,此参数可以包含在高位字在低位字资源标识符和零。使用MAKEINTRESOURCE宏来创建此值。
要使用预定义的图标之一,HINSTANCE参数设置为NULL和lpIconName参数为下列值之一。
IDI_APPLICATION
默认的应用程序图标。
IDI_ASTERISK
相同IDI_INFORMATION。
IDI_ERROR
手形图标。
IDI_EXCLAMATION
相同IDI_WARNING。
IDI_HAND
相同IDI_ERROR。
IDI_INFORMATION
星号图标。
IDI_QUESTION
问号图标。
IDI_WARNING
感叹号图标。
IDI_WINLOGO
Windows徽标图标。 Windows XP中:默认应用程序图标。
IDI_SHIELD
安全盾牌图标。
返回值
如果函数成功,返回值是一个句柄新加载图标。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
LoadIcon加载图标资源仅当它有没有被加载,否则,它检索的句柄现有的资源。该函数搜索图标的图标资源最适合于当前显示适当的。该图标的资源可以是彩色或黑白位图。
LoadIcon只能加载一个图标的大小符合SM_CXICON和SM_CYICON系统度量的值。使用LoadImage函数来加载其他大小的图标。
在Windows 95/98/Me:LoadIconW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
图标概述,CreateIcon,的LoadImage,MAKEINTRESOURCE
==英文原文==LoadIcon Function
The LoadIcon function loads the specified icon resource from the executable (.exe) file associated with an application instance.
Note This function hase been superseded by the LoadImage function.
Syntax
HICON LoadIcon( HINSTANCE hInstance,
LPCTSTR lpIconName
);
Parameters
hInstance
[in] Handle to an instance of the module whose executable file contains the icon to be loaded. This parameter must be NULL when a standard icon is being loaded.
lpIconName
[in]
Pointer to a null-terminated string that contains the name of the icon resource to be loaded. Alternatively, this parameter can contain the resource identifier in the low-order word and zero in the high-order word. Use the MAKEINTRESOURCE macro to create this value.
To use one of the predefined icons, set the hInstance parameter to NULL and the lpIconName parameter to one of the following values.
IDI_APPLICATION
Default application icon.
IDI_ASTERISK
Same as IDI_INFORMATION.
IDI_ERROR
Hand-shaped icon.
IDI_EXCLAMATION
Same as IDI_WARNING.
IDI_HAND
Same as IDI_ERROR.
IDI_INFORMATION
Asterisk icon.
IDI_QUESTION
Question mark icon.
IDI_WARNING
Exclamation point icon.
IDI_WINLOGO
Windows logo icon. Windows XP: Default application icon.
IDI_SHIELD
Security Shield icon.
Return Value
If the function succeeds, the return value is a handle to the newly loaded icon.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
LoadIcon loads the icon resource only if it has not been loaded; otherwise, it retrieves a handle to the existing resource. The function searches the icon resource for the icon most appropriate for the current display. The icon resource can be a color or monochrome bitmap.
LoadIcon can only load an icon whose size conforms to the SM_CXICON and SM_CYICON system metric values. Use the LoadImage function to load icons of other sizes.
Windows 95/98/Me: LoadIconW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
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 ANSI and Unicode versions.
See Also
Icons Overview , CreateIcon , LoadImage , MAKEINTRESOURCE
==原始网址==http://msdn.microsoft.com/en-us/library/ms648072(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 11:22:59