HeaderPane
Main
Hide
Share Link
Print

LoadGDIPlusImageFromFile

Loads a GDI+ image from a file.

C

LPVOID WINAPI SftDate_LoadGDIPlusImageFromFile(LPCTSTR lpszFilename);

Parameters

lpszFilename

The name of the file containing the image.

Returns

If successful, the return value is a Gdiplus::Image pointer. NULL is returned if GDI+ is not available or the file cannot be loaded or decoded.

Comments

The LoadGDIPlusImageFromFile function loads a GDI+ image from a file, so it can be used as the picture of a special date (SFTDATE_SPECIALDATE) or of a day in the NM_SFTDATE_DAYFORMATTING notification (SFT_PICTURE, SFT_PICTURE_GDIPLUS). The file can hold an image in any format supported by GDI+, such as PNG or JPEG.

This function is mainly intended for applications written using C, which don't readily have access to the Gdiplus::Image class.

The application retains ownership of the Gdiplus::Image pointer returned by SftDate_LoadGDIPlusImageFromFile. The image must remain valid as long as a control uses it. Once the image is no longer needed, it is released using SftDate_FreeGDIPlusImageLoadedFromFile.

See Also C/C++ API | Categories | Notifications


Last Updated 11/26/2026 - (email)
© 2026 Softel vdm, Inc.