please dont rip this site Prev Next

ImageList_LoadImage info  Overview  Group

The ImageList_LoadImage function creates an image list from the specified bitmap, cursor, or icon resource.

HIMAGELIST ImageList_LoadImage(

    HINSTANCE hi, 

// handle of instance containing the image

    LPCTSTR lpbmp,

// identifies the image to load

    int cx,

// image width

    int cGrow,

// number of new images the list can contain

    COLORREF crMask,

// color used to generate a mask

    UINT uType,

// type of image to load

    UINT uFlags

// flags that control image loading

   );

Parameters

hi 
Handle to the instance that contains the resource. This parameter can be NULL if you are loading an image from a file or loading an OEM resource.
lpbmp
Identifies the image to load.

If the uFlags parameter includes LR_LOADFROMFILE, lpbmp is a pointer to a null-terminated string that names the file containing the image to load.

If the hi parameter is non-NULL and LR_LOADFROMFILE is not specified, lpbmp is a pointer to a null-terminated string that contains the name of the image resource in the hi module.

If hi is NULL and LR_LOADFROMFILE is not specified, 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:

Prefix

Meaning

OBM_

OEM bitmaps

OIC_

OEM icons

OCR_

OEM cursors

cx
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
Amount of images by which the image list can grow when the system needs to resize the list to make room for new images. This parameter represents the number of new images that the resized image list can contain.
crMask
Color used to generate a mask. Each pixel of this color in the specified bitmap, cursor, 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.
uType
Flag that specifies the type of image to load. This parameter can be one of the following values:

Value

Meaning

IMAGE_BITMAP

Loads a bitmap.

IMAGE_CURSOR

Loads a cursor.

IMAGE_ICON

Loads an icon.

uFlags
Flags that specify how to load the image. This parameter can be a combination of the following values:

Value

Meaning

LR_DEFAULTCOLOR

Uses the color format of the display.

LR_LOADDEFAULTSIZE

Uses the width or height specified by the system metric values for cursors and icons if the cx parameter is set to zero. If this value is not specified and cx is set to zero, the function sets the size to that specified in the resource. If the resource contains multiple images, the function sets the size to that of the first image.

LR_LOADFROMFILE

Loads the image from the file specified by the lpbmp parameter.

LR_LOADMAP3DCOLORS

Searches the color table for the image and replaces the following shades of gray with the corresponding three-dimensional color:

Dk Gray,
RGB(128, 128, 128)

COLOR_3DSHADOW

Gray,
RGB(192, 192, 192)

COLOR_3DFACE

Lt Gray,
RGB(223, 223, 223)

COLOR_3DLIGHT

LR_LOADTRANSPARENT

Retrieves the color value of the first pixel in the image and replaces the corresponding entry in the color table with the default window color (the COLOR_WINDOW display color). All pixels in the image that use that entry become the default window value color. This value applies only to images that have corresponding color tables.

LR_MONOCHROME

Loads the image in black and white.

LR_SHARED

Shares the image handle if the image is loaded multiple times. Do not use this value for images that have nontraditional sizes that might change after loading or for images that are loaded from a file.

Return Values

If the function succeeds, the return value is the handle of the image list.

If the function fails, the return value is NULL.

See Also

RGB 


file: /Techref/os/win/api/win32/func/src/f46_8.htm, 9KB, , updated: 2000/4/7 11:19, local time: 2024/11/17 19:40,
TOP NEW HELP FIND: 
18.221.96.100:LOG IN

 ©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://massmind.ecomorder.com/Techref/os/win/api/win32/func/src/f46_8.htm"> ImageList_LoadImage</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?

 

Welcome to ecomorder.com!

 

Welcome to massmind.ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .