다음을 통해 공유


LoadBitmap (Compact 2013)

3/28/2014

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

Syntax

HBITMAP LoadBitmap(
  HINSTANCE hInstance, 
  LPCTSTR lpBitmapName
); 

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 Value

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.

Requirements

Header

winuser.h

Library

Loadbmp.lib

See Also

Reference

GDI Functions
CreateBitmap
DeleteObject
LoadIcon
MAKEINTRESOURCE