Share via


ImageList_LoadBitmap

This macro calls the ImageList_LoadImage function to create an image list from the specified bitmap resource.

HIMAGELIST WINAPI ImageList_LoadBitmap(
HINSTANCE hi, 
LPCSTR lpbmp, 
int cx, 
int cGrow, 
COLORREF crMask );

Parameters

  • hi
    [in] Handle to the instance that contains the bitmap resource. This parameter is NULL if you are loading an OEM bitmap.

  • 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 bitmap to load. To create this value, use the MAKEINTRESOURCE macro with one of the OEM bitmap identifiers defined in WINUSER.H. These identifiers have the OBM_ prefix.

  • 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 bitmap.

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

Return Values

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

Remarks

This macro is not supported for emulation.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Commctrl.h   Commctrl.lib, Imgctl.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

ImageList_LoadImage, MAKEINTRESOURCE

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.