Loads a PNG / TIFF / JPEG / GIF / EMF image from a file or an embedded application resource as a GDI+ image suitable for SFT_PICTURE_GDIPLUS.
C
LPVOID SftMask_LoadGDIPlusImageFromFile(LPCTSTR lpszFilename); LPVOID SftMask_LoadGDIPlusImageFromResource(HMODULE hInst, LPCTSTR lpszResourceType, LPCTSTR lpszResourceName);
lpszFilename
The image file to load.
hInst
The module containing the resource.
lpszResourceType, lpszResourceName
The resource type and name.
The return value is a Gdiplus::Image* as an opaque LPVOID, or NULL if the image could not be loaded.
The returned pointer is plugged into a SFT_PICTURE slot of type SFT_PICTURE_GDIPLUS (typically through Sft_SetPictureGDIPlusImage), for example for the error images ImageInvalid, ImageEmpty and ImageRequired.
The loader and the matching free routine must always be paired - see FreeGDIPlusImage.
See Also FreeGDIPlusImage | GDI+ | Error Image