LoadImageFlags Enumeration

Flags that determines how the image is loaded by LoadImage(IntPtr, String, LoadImageType, Int32, Int32, LoadImageFlags) function.

Definition

Namespace: DevCase.Win32.Enums
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[FlagsAttribute]
public enum LoadImageFlags

Remarks

Members

DefaultColor 0 The default flag; it does nothing.

All it means is "not Monochrome".

Monochrome 1 Loads the image in black and white.
LoadFromFile 16 Loads the stand-alone image from the file specified by name parameter (icon, cursor, or bitmap file).
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.

Do not use this option if you are loading a bitmap with a color depth greater than 8bpp.

DefaultSize 64 Uses the width or height specified by the system metric values for cursors or icons, if the width or height parameters are set to zero.

If this flag is not specified and width or height parameters 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.

VGAColor 128 Uses true VGA colors.
LoadMap3DColors 4,096 Searches the color table for the image and replaces the following shades of gray with the corresponding 3-D color.
CreateDibSection 8,192 When the uType parameter specifies 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.

Shared 32,768 Shares the image handle if the image is loaded multiple times.

If Shared is not set, a second call to LoadImage(IntPtr, String, LoadImageType, Int32, Int32, LoadImageFlags) 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.

See Also