Microsoft Windows CE 3.0  

LoadBitmap

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function loads the specified bitmap resource from a module's executable file.

HBITMAP
LoadBitmap( HINSTANCE
hInstance
, LPCTSTR
lpBitmapName
);

Parameters

hInstance
[in] Handle to the instance of the module whose executable file contains the bitmap to be loaded.
lpBitmapName
[in] Long pointer to a null-terminated string that contains the name of the bitmap resource to be loaded. Alternatively, this parameter can consist of the resource identifier in the low-order word and zero in the high-order word. The MAKEINTRESOURCEmacro can be used to create this value.

Return Values

The handle to the specified bitmap indicates success. NULL indicates failure. To get extended error information, call GetLastError.

Remarks

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

The application must call the DeleteObjectfunction to delete each bitmap handle returned by the LoadBitmapfunction.

Windows CE version 1.0 supports only a 2 bit gray scale palette, so use only a bitmap that is 1 bit per pixel (monochrome .bmp) or 2 bits per pixel (.2bp).

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h   Loadbmp.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

CreateBitmap, DeleteObject, GetLastError, LoadIcon, MAKEINTRESOURCE