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
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