HeaderPane
Main
Hide

SftButton/DLL 3.0 - Button Control

Share Link
Print

GDI+

The button control uses GDI+ for additional image features not otherwise available:

  • Image support for PNG, TIFF, JPEG, GIF, Exif, EMF+, EMF (GDI+ images) with full support for alpha-blended (translucent and semi-transparent) images

GDI+ ships with all supported Windows versions (Windows 10 and above), so these features are always available.

Loading GDI+ images

SftButton provides four helpers that wrap GDI+ image creation and disposal so the application does not have to call GdiplusStartup or work with Gdiplus::Image directly. Each loader returns a Gdiplus::Image* as an opaque LPVOID that is plugged into a SFT_PICTURE slot of type SFT_PICTURE_GDIPLUS (typically through Sft_SetPictureGDIPlusImage).

FunctionDescription
LoadGDIPlusImageFromResourceLoad a PNG / TIFF / JPEG / GIF / EMF image from an embedded application resource.
LoadGDIPlusImageFromFileLoad the same image formats from a file on disk.
FreeGDIPlusImageLoadedFromResourceFree a pointer returned by LoadGDIPlusImageFromResource.
FreeGDIPlusImageLoadedFromFileFree a pointer returned by LoadGDIPlusImageFromFile.

The loader and the matching free routine must always be paired - resource-loaded images go through FreeGDIPlusImageLoadedFromResource, file-loaded images through FreeGDIPlusImageLoadedFromFile.


Last Updated 05/09/2026 - (email)
© 2026 Softel vdm, Inc.