Enum WinUser.LoadImageFlag
Possible values of the loadFlags
parameter when calling LoadImage(IntPtr, string, LoadImageType, int, int, LoadImageFlag).
[Flags]
public enum WinUser.LoadImageFlag : uint
Fields
LR_CREATEDIBSECTION = 8192
When the
type
parameter specifies IMAGE_BITMAP, causes the function to return a DIB section bitmap rather than a compatible bitmap. This flag is useful for loading a bitmap without mapping it to the colors of the display device.LR_DEFAULTCOLOR = 0
The default flag; it does nothing. All it means is "not LR_MONOCHROME".
LR_DEFAULTSIZE = 64
Uses the width or height specified by the system metric values for cursors or icons, if the
cx
orcy
values are set to zero. If this flag is not specified andcx
andcy
are set to zero, the function uses the actual resource size. If the resource contains multiple images, the function uses the size of the first image.LR_LOADFROMFILE = 16
Loads the standalone image from the file specified by name (icon, cursor, or bitmap file).
LR_LOADMAP3DCOLORS = 4096
Searches the color table for the image and replaces the following shades of gray with the corresponding 3-D color.
Dk Gray, RGB(128,128,128) with COLOR_3DSHADOW Gray, RGB(192,192,192) with COLOR_3DFACE Lt Gray, RGB(223,223,223) with COLOR_3DLIGHT
LR_LOADTRANSPARENT = 32
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 (COLOR_WINDOW). All pixels in the image that use that entry become the default window color. This value applies only to images that have corresponding color tables.
IfloadFlags
includes both the LR_LOADTRANSPARENT and LR_LOADMAP3DCOLORS values, LR_LOADTRANSPARENT takes precedence. However, the color table entry is replaced with COLOR_3DFACE rather than COLOR_WINDOW.Do not use this option if you are loading a bitmap with a color depth greater than 8bpp.
LR_MONOCHROME = 1
Loads the image in black and white.
LR_SHARED = 32768
Shares the image handle if the image is loaded multiple times. If LR_SHARED is not set, a second call to LoadImage(IntPtr, string, LoadImageType, int, int, LoadImageFlag) for the same resource will load the image again and return a different handle.
When you use this flag, the system will destroy the resource when it is no longer needed.
When loading a system icon or cursor, you must use LR_SHARED or the function will fail to load the resource.
This function finds the first image in the cache with the requested resource name, regardless of the size requested.Do not use this option for images that have non-standard sizes, that may change after loading, or that are loaded from a file.
LR_VGACOLOR = 128
Uses true VGA colors.