The combo box control uses GDI+ for features not otherwise available:
GDI+ ships with all supported Windows versions (Windows 10 and above). An application can test whether GDI+ is available using the GetGDIPlusAvailable function.
SftBox/DLL provides four functions which load and free GDI+ images, so the application does not have to initialize GDI+ or use GDI+ classes directly. Each load function returns an image pointer, which is used in a SFT_PICTURE structure of type SFT_PICTURE_GDIPLUS (see Sft_SetPictureGDIPlusImage).
| Function | Description |
|---|---|
| LoadGDIPlusImageFromResource | Loads an image from an application resource. |
| LoadGDIPlusImageFromFile | Loads an image from a file. |
| FreeGDIPlusImageLoadedFromResource | Frees an image returned by LoadGDIPlusImageFromResource. |
| FreeGDIPlusImageLoadedFromFile | Frees an image returned by LoadGDIPlusImageFromFile. |
The load function and the matching free function must always be paired. An image must not be freed while a combo box still uses it.
DrawSelectionOutline draws the outline rectangle with gradient fill used for selected items, for use in an application's own drawing code.