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 |
); |
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 |
Value |
Meaning |
IMAGE_BITMAP |
Loads a bitmap. |
IMAGE_CURSOR |
Loads a cursor. |
IMAGE_ICON |
Loads an icon. |
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, |
COLOR_3DSHADOW |
Gray, |
COLOR_3DFACE |
Lt Gray, |
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. |
If the function succeeds, the return value is the handle of the image list.
If the function fails, the return value is NULL.
file: /Techref/os/win/api/win32/func/src/f46_8.htm, 9KB, , updated: 2000/4/7 11:19, local time: 2024/11/28 07:59,
18.191.93.18: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? <A HREF="http://sxlist.com/techref/os/win/api/win32/func/src/f46_8.htm"> ImageList_LoadImage</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.