CImageCtx.LoadBitmapFromResourcemethod
Loads a bitmap from a resource file into the control.
Syntax
FUNCTION LoadBitmapFromResource (BYVAL hInstance AS HINSTANCE, BYREF wszResourceName AS WSTRING) AS LONG
Parameters
| Name | Description | |
|---|---|---|
hInstance | Handle to the instance of the module whose executable file contains the resource. A value of NULL specifies the module handle associated with the image file that the operating system used to create the current process. | |
wszResourceName | The name of the resource. |
Return value
Ok (0) or an error code.
Description
Loads a bitmap from a resource file into the control.
Note: Because GdipCreateBitmapFromResource uses LoadImageW to load the resource, it only works with icons or bitmaps. It works with .bmp and .png files, but fails with .jpg and .tif files.
Reference
- Defined in AfxNova/CImageCtx.inc:500
- Documented in Graphics/CImageCtx Class.md
- Topic: CImageCtx Class