HeaderPane
Main
Hide

SftTree/DLL 8.0 - Tree Control

Share Link
Print

LoadGDIPlusImageFromFile

Loads a GDI+ image from a file.

C

LPVOID SftTree_LoadGDIPlusImageFromFile(LPCTSTR lpszFilename);

Parameters

lpszFilename

The path and name of the image file to load.

Returns

If successful, the return value is a Gdiplus::Image pointer or NULL if the function failed.

Comments

Loads a GDI+ image from a file.

This function is mainly intended for applications written using C. Because Gdiplus is C++ based, C applications don't readily have access to the Gdiplus::Image class and cannot use Bitmap::FromFile to load a GDI+ image. Using SftTree_LoadGDIPlusImageFromFile even C applications can use GDI+ images, without needing access to GDI+ itself.

The application retains ownership of the Gdiplus::Image pointer returned by SftTree_LoadGDIPlusImageFromFile. Once the image is no longer needed, it can be released using SftTree_FreeGDIPlusImageLoadedFromFile, which frees the associated memory.

LoadGDIPlusImageFromFile provides essentially the same service as the GDI+ Bitmap::FromFile function.

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