please dont rip this site Prev Next

LoadIcon info  Overview  Group

The LoadIcon function loads the specified icon resource from the executable (.EXE) file associated with an application instance. This function has been superseded by the LoadImage function

HICON LoadIcon(

    HINSTANCE hInstance,

// handle of application instance

    LPCTSTR lpIconName 

// icon-name string or icon resource identifier

   );

Parameters

hInstance
Identifies 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
Points 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 Windows predefined icons, set the hInstance parameter to NULL and the lpIconName parameter to one of the following values:

Value

Description

IDI_APPLICATION

Default application icon.

IDI_ASTERISK

Asterisk (used in informative messages).

IDI_EXCLAMATION

Exclamation point (used in warning messages).

IDI_HAND

Hand-shaped icon (used in serious warning messages).

IDI_QUESTION

Question mark (used in prompting messages).

IDI_WINLOGO

Windows logo.

Return Values

If the function succeeds, the return value is the handle of 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.

See Also

CreateIcon, LoadImage, MAKEINTRESOURCE 


file: /Techref/os/win/api/win32/func/src/f53_12.htm, 4KB, , updated: 2001/6/25 06:26, local time: 2024/11/4 11:45,
TOP NEW HELP FIND: 
18.117.104.53:LOG IN
©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://linistepper.com/techref/os/win/api/win32/func/src/f53_12.htm"> LoadIcon</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?