Partager via


LoadBitmap (Windows CE 5.0)

Send Feedback

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

HBITMAPLoadBitmap(HINSTANCEhInstance, LPCTSTRlpBitmapName);

Parameters

  • hInstance
    [in] Handle to the instance of the module for which the executable file contains the bitmap that you want to load.

  • lpBitmapName
    [in] Long pointer to a null-terminated string that contains the name of the bitmap resource that you want to load.

    Alternatively, this parameter can consist of the resource identifier in the low-order word and zero in the high-order word.

    The MAKEINTRESOURCE macro can be used to create this value.

    The maximum value for the resource identifier is 32000.

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

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

OS Versions: Windows CE 1.0 and later.
Header: Winuser.h.
Link Library: Loadbmp.lib.

See Also

CreateBitmap | DeleteObject | LoadIcon | MAKEINTRESOURCE

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.