Share via


LoadIconW_I (Windows Embedded CE 6.0)

1/6/2010

This function loads the specified icon resource from the executable (.exe) file associated with an application instance.

Syntax

HICON WINAPI LoadIconW_I(
  HINSTANCE hinst,
  PCTSTR pszIcon
);

Parameters

  • hinst
    [in] Handle to an instance of the module for which the executable file contains the icon that you want to load. This parameter must be NULL when you load a standard icon.
  • pszIcon
    [in] Pointer to a null-terminated string that contains the name of the icon resource that you want to load. 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 latter value.

Return Value

A handle to the newly loaded icon indicates success. NULL indicates failure. To get extended error information, call GetLastError.

Remarks

LoadIconW_I loads the icon resource only if you did not load the icon resource previously; otherwise, LoadIconW_I retrieves a handle to the existing resource. The function searches within the icon resource for the icon most appropriate for the current display. The icon resource can be a color or monochrome bitmap.

LoadIconW_I 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.

Requirements

Header gwebypasscoredllthunk.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

GWES OS Functions
GetSystemMetrics
LoadIcon
LoadImage
MAKEINTRESOURCE