Export (0) Print
Expand All

SHLoadImageResource

Windows Mobile 6.5
4/8/2010

Converts an image file in the resource file to a bitmap file. A resource image file should be coded in the resource file as follows (using BMP as an example): IDB_MYIMAGE_BMP GIF DISCARDABLE "MyImage.bmp".

Bb416325.note(en-us,MSDN.10).gifNote:
Please note that the example resource line above correctly specifies GIF, even though the resource itself is actually a bitmap. GIF should be specified for all image resources, regardless of their format. Supplying any specifier other than GIF results in failure to load the image resource.


HBITMAP SHLoadImageResource (
  HINSTANCE hinst,
  UINT uIdImageFile
);

hinst

[in] Handle to the module whose executable file contains the image file.

uIdImageFile

[in] UINT identifying the image file.

A handle to a bitmap if successful, NULL otherwise.

This function converts files of several types, including GIF (Graphics Interchange Format), PNG (Portable Network Graphics), JPG (Joint Photographic Experts Group), ICO (icon), and BMP (bitmap) file formats.

Bb416325.note(en-us,MSDN.10).gifNote:
When you no longer need the SHLoadImageResource Object call the DeleteObject function to delete it.

Headeraygshell.h
Libraryaygshell.lib
Windows Embedded CEWindows CE .NET 4.0 and later
Windows MobilePocket PC for Windows Mobile 2003 and later

Community Additions

ADD
Show:
© 2014 Microsoft