Loads a GDI+ image from a file.
C
LPVOID WINAPI SftDate_LoadGDIPlusImageFromFile(LPCTSTR lpszFilename);
lpszFilename
The name of the file containing the image.
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.
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