HeaderPane
Main
Hide

SftMask/DLL 7.0 - Masked Edit Control

Share Link
Print

LoadGDIPlusImage

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

Parameters

lpszFilename

The image file to load.

hInst

The module containing the resource.

lpszResourceType, lpszResourceName

The resource type and name.

Returns

The return value is a Gdiplus::Image* as an opaque LPVOID, or NULL if the image could not be loaded.

Comments

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


Last Updated 08/30/2026 - (email)
© 2026 Softel vdm, Inc.