2.1.25.48 LoadBitmap


Description

The LoadBitmap function loads the specified bitmap resource from a module's executable file. This function has been superseded by the LoadImage function.

Syntax

HBITMAP LoadBitmap( HINSTANCE hInstance, LPCSTR lpBitmapName )

Parameters

hInstance
[input] instance handle, use NULL when Loading from file
lpBitmapName
[input] either resource name or resID translated into a pointer

Return

The handle to the specified bitmap indicates success.

NULL indicates failure.

To get extended error information, call GetLastError.

Examples

Remark

If the bitmap pointed to by the lpBitmapName parameter does not exist or there is insufficient memory to load the bitmap, the function fails.

The application must call the DeleteObject function to delete each bitmap handle returned by the LoadBitmap function.

Bitmaps returned from LoadBitmap are not writable. All calls to write to a bitmap returned by the LoadBitmap function will fail.

See Also

LoadImage

Header to Include

origin.h

Reference