Loads an icon, cursor, animated cursor, bitmap or an enhanced metafile from a dll resources or file
HANDLE LoadImage( HINSTANCE hInstance, LPCSTR lpszName, UINT uType, int cxDesired, int cyDesired, UINT nLoad )
- [inpupt] instance handle, use NULL when Loading from file
- [inpupt] when loading from resource, either resource name or resID translated into a pointer when Loading from file, pass file name
- [inpupt]type of the picture loading could one of IMAGE_BITMAP,IMAGE_ICON,IMAGE_ENHMETAFILE
- [inpupt] is the desired width of the image being loaded (in pixels)
- [inpupt] is the desired heiht of the image being loaded (in pixels)
- [inpupt] Load flags, is one of the LR_ defines above. If loading from File for example use, LR_LOADFROMFILE
If the function succeeds, the return value is the handle of the newly loaded image.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
When you are finished using a bitmap, cursor, or icon you loaded without specifying the LR_SHARED flag, you can release its associated memory by calling one of the functions in the following table.
The system automatically deletes these resources when the process that created them terminates; however, calling the appropriate function saves memory and decreases the size of the process's working set.
header to Include