LoadImage is a function, the function is loaded icon, cursor, or bitmap.
Edit Profile
Functions Function : This function is loaded icon, cursor, or bitmap.
The function prototype:
HANDLE the LoadImage
(
the HINSTANCE the hinst,
LPCTSTR the lpszName,
UINT the uType,
int cxDesired,
int cyDesired,
UINT fuLoad
);
parameter
the hinst : image processing including instances loaded module. To mount OEM image, set this parameter value is 0.
the lpszName : an image processing load. If the parameter hinst is non-NULL, and the value of the parameter fuLoad LR_LOADFROMFILE omitted, then the parameter is a pointer to a reserved image lpszName resource name in hinst loaded modules, and to the end of string is NULL.
If the argument is null hinst and LR_LOADFROMFILE not specified, this parameter must be low word loaded OEM logo image. OEM image identifier WINUSER.H is defined in the header file, the following meanings include prefixes:
OBM_ OEM : bitmap; OIC_OEM icon; OCR_OEM: cursor.
If the parameter contains LR_LOADFROMFILE fuLoad value, the parameter is included lpszName image file name.
the uType : Specifies the type of the image is loaded. This parameter can be the following values, the following meaning:
IMAGE_BITMAP: loading bitmaps; IMAGE_CURSOR: loading cursor; IMAGE_ICON: loading icon.
cxDesired : designated icon or cursor width, in pixels. If this parameter is zero and the parameter value LR_DEFAULTSIZE fuLoad, then the function or use SM_CXICON SM_CXCURSOR system metric value setting width; If this parameter is zero and the value LR_DEFAULTSIZE not used, then the function currently used resource width.
cyDesired: Specifies the height of the icon or cursor, in pixels. If this parameter is zero and the parameter value LR_DEFAULTSIZE fuLoad, then the function or use SM_CXICON SM_CXCURSOR system metric value setting height; If this parameter is zero and the value LR_DEFAULTSIZE not used, then the function using the current resource level.
fuLoad : Specifies the list according to a composite value of the following function values, values of the following meanings:
LR_DEFAULTCOLOR : default flag; it will do nothing. It means "no LR_MONOCHROME".
LR_CREATEDIBSECTION : When a parameter is specified as uType IMAGE_BITMAP, such that the function returns a DIB section bitmap, rather than a compatible bitmap. This flag loading a bitmap, rather than to the map display apparatus useful for its color.
LR_DEFAULTSIZE : If cxDesired or cyDesired width and height are set to zero, the specified metric value using the system identification cursor or icon. If this parameter is not set and cxDesired or cyDesired is set to zero, the function uses the actual resource size. If the resource contains a plurality of images, then the first size of the image.
LR_LOADFROMFILE : loading an image according to the value of the parameter lpszName. If the flag is not given, lpszName value of the resource name.
LR_LOADMAP3DCOLORS : a color lookup table and replaced by the image gradation corresponding 3D color table below.
Alternative color:
Dk Gray RGB (128,128,128) COLOR_3DSHADOW; Gray RGB (192,192,192) COLOR_3DFACELt Gray RGB (223,223,223) COLOR_3DLIGHT LR_LOADTRANSPARENT;
and to find a missing color pixel values of the image in accordance with the system color table color value in the state substituted for the value of a corresponding interface. All color image pixels are changed to the use of such an interface system default color form. This is only to be used to apply the corresponding color table.
If the two values LR_LOADTRANSPARENT fuLoad and LR_LOADMAP3DCOLORS, the LRLOADTRANSPARENT priority. However, the interface is replaced by a color table COLOR_3DFACE, instead COLOR_WINDOW.
LR_MONOCHROME: loading monochrome FIG.
LR_SHARED: If the image is to be shared is loaded multiple times. If LR_SHARED is not set, then again with a second resource to call this image will then load the image again and return a different handle.
Do not use LR_SHARED images of different standard sizes, may be changed after loading, or loaded from a file.
Windows 95 and Windows 98: function based on the first image resource name cache the requested discovery, regardless of the requested size. LR_VGACOLOR: Use VGA true color.
Return Value: If the function succeeds, the return value is the handle of related resources data. If the function fails, the return value is NULL. To get extended error information, call GetLastError.
note: When finished using the resources, must call the function to release the accelerator tables, bitmaps, cursors, icons, and menus share memory resources; accelerator table: DesteoyAcceleratorTable; bitmap: DeleteObject; cursor: DestroyCursor; icon: DestroyIcon; menu: DestroyMenu
when the process of creating terminated, the system will automatically delete these resources. But call the relevant function can retain memory settings to reduce the space occupied by the work process.
Windows CE: for IMAGE_BITMAP, the parameters cxDesred and cyDesred p must be zero. Windows CE does not support chart jump or flicker.
Parameter must fuLoad (= LR_DEFAULTCOLOR).
If the target platform does not support a mouse cursor, you can specify the value of the parameter cxDesred and cyDsired SM_CXCURSOR and SM_CYCURSOR, but can not specify the value of the parameter IMAGE_CURSOR uType.
If the target platform supports mouse cursor, you can specify the value of the parameter cxDesired and cyDesred SM_CXCURSOR and SM_CYCURSOR, but also to specify the value of the parameter in IMAGE_CURSOR uType.
Function Description: This function is not available for loading jpg format picture, a function may be used gdi + GdipDrawImage loading jpg, png format images