Compartilhar via


ImageList_LoadImage (Windows CE 5.0)

Send Feedback

This function creates an image list from the specified bitmap or icon resource.

HIMAGELISTWINAPIImageList_LoadImage(HINSTANCEhi, LPCSTRlpbmp, intcx, intcGrow, COLORREFcrMask, UINTuType, UINTuFlags );

Parameters

  • hi
    [in] Handle to the instance of an application or DLL that contains an image.

  • lpbmp
    [in] Long pointer to the image to load.

    If the hi parameter is non-NULL, lpbmp is the address of a null-terminated string that contains the name of the image resource in the hi module.

    If hi is NULL, the low-order word of this parameter must be the identifier of an OEM image to load. To create this value, use the MAKEINTRESOURCE macro with one of the OEM image identifiers defined in Winuser.h. These identifiers have the following prefixes:

    • OBM_ for OEM bitmaps
    • OIC_ for OEM icons
  • cx
    [in] Width of each image. The height of each image and the initial number of images are inferred by the dimensions of the specified resource.

  • cGrow
    [in] Number of images by which the image list can grow when the system needs to make room for new images. This parameter represents the number of new images that the resized image list can contain.

  • crMask
    [in] Color used to generate a mask. Each pixel of this color in the specified bitmap or icon is changed to black, and the corresponding bit in the mask is set to 1. If this parameter is the CLR_NONE value, no mask is generated. If this parameter is the CLR_DEFAULT value, the color of the pixel at the upper-left corner of the image is treated as the mask color.

  • uType
    [in] Flag that specifies the type of image to load. This parameter can be one of the following values.

    Value Description
    IMAGE_BITMAP Loads a bitmap.
    IMAGE_ICON Loads an icon.
  • uFlags
    [in] Unsupported; set to 0.

Return Values

The handle to the image list indicates success. NULL indicates failure.

Remarks

You can only use this function with icons, not cursors.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Commctrl.h.
Link Library: Commctrl.lib, Imgctl.lib.

See Also

ImageList_LoadBitmap | MAKEINTRESOURCE

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.