SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTree/NET 2.0 - Tree Control
SftPicture2 is the shared header that describes images, glyphs and text labels used by every Softel vdm DLL control (SftTree, SftTabs, SftBox, SftMask, SftButton). The two structures defined here - SFT_PICTURE and SFT_TEXT - appear as fields on per-product control structures (SFTBUTTON_CONTROL.Picture1, SFTTREE_CELL.Picture, SFTTABS_TAB.Picture, etc.) and supply a uniform model for image and text rendering across all DLL controls.
The header provides:
Per-product DLL headers (SftTree.h, SftTabs.h, SftBox.h, SftMask.h, SftButton.h) include SftPicture2.h automatically. Application code that uses any one of those product headers therefore has access to SFT_PICTURE, SFT_TEXT and the helper functions without an explicit #include "SftPicture2.h".
Direct inclusion is only needed in source files that work with picture / text descriptors but do not include any per-product header (rare).
SFT_PICTURE is a type-tagged union: the type field selects which arm of the embedded Picture union is meaningful, and the Sft_SetPicture* setters keep both fields consistent with each other. Reading code can use the Sft_IsPicture* predicates instead of switching on type directly.
Per-product support: not every DLL control supports every SFT_PICTURE_* type. Each product's documentation lists the picture types it accepts.
| Constant | Slot | Description |
|---|---|---|
| SFT_PICTURE_BITMAP | Picture.hBitmap | A device-dependent bitmap. Top-left pixel is the transparent color. |
| SFT_PICTURE_ICON | Picture.hIcon | An icon of any size. |
| SFT_PICTURE_ICON_16x16 | Picture.hIcon | Discontinued. 16x16 icon. New code should use SFT_PICTURE_ICON. |
| SFT_PICTURE_ICON_32x32 | Picture.hIcon | Discontinued. 32x32 icon (alias for SFT_PICTURE_ICON). New code should use SFT_PICTURE_ICON. |
| SFT_PICTURE_IMAGELIST | Picture.Image | An entry in an image list. Holds the HIMAGELIST plus normal and disabled image indices. |
| SFT_PICTURE_IMAGELISTOVL | Picture.ImageOvl | An image list entry with an overlay image index. |
| SFT_PICTURE_IDISPATCH | Picture.IPicDisp | An OLE picture object accessed through IPictureDisp. |
| SFT_PICTURE_IPICTURE | Picture.IPic | An OLE picture object accessed through IPicture. |
| SFT_PICTURE_GDIPLUS | Picture.GDIPlusImage.lpImageObject | A GDI+ image (PNG, TIFF, JPEG, GIF, EMF+). |
| SFT_PICTURE_NET | Picture.NETImage.pUnknown | A .NET System.Drawing.Image reference. |
| SFT_PICTURE_AVI | Picture.hwndAnim | An AVI clip hosted in a Microsoft Animation control. The HWND of the animation control. |
| SFT_PICTURE_COLOR_SAMPLE | Picture.ColorSample | A solid color swatch with optional border. Width / height / sample color / frame color. |
| SFT_PICTURE_SIZEONLY | Picture.Dimension | A layout placeholder that reserves space but draws nothing. |
| SFT_PICTURE_CB | Picture.CheckBox | A two-state check box glyph (state 0 / 1). |
| SFT_PICTURE_CB3 | Picture.CheckBox | A three-state check box glyph (state -1 / 0 / 1). |
| SFT_PICTURE_RB | Picture.CheckBox | A radio button glyph. |
| SFT_PICTURE_UPDOWN | Picture.CheckBox | An up / down arrow glyph. |
| SFT_PICTURE_UPDOWNSORT | Picture.CheckBox | A sort-direction indicator (up = ascending, down = descending). |
| Function | Description |
|---|---|
| Sft_InitPicture | Zero a SFT_PICTURE so it represents an empty slot. |
| Sft_ClearPicture | Reset a SFT_PICTURE without releasing the resources it referenced. |
| Sft_CopyPicture | Copy one SFT_PICTURE to another (handles / COM pointers copied verbatim). |
| Sft_IsPicture | Return TRUE if the slot is non-empty. |
| Sft_IsPictureBitmap / Icon / etc. | Type-specific predicates - one per supported picture type. |
| Sft_SetPictureBitmap | Store an HBITMAP. |
| Sft_SetPictureIcon | Store an HICON (any size, 16x16, or 32x32 variants). |
| Sft_SetPictureImageList | Store an image list reference (with or without overlay). |
| Sft_SetPictureColorSample | Store a color swatch. |
| Sft_SetPictureIDispatch | Store an IPictureDisp pointer. |
| Sft_SetPictureIPicture | Store an IPicture pointer. |
| Sft_SetPictureAnimate | Store the HWND of an AVI animation control. |
| Sft_SetPictureSizeOnly | Store a dimension-only placeholder. |
| Sft_SetPictureCheckBox | Store a two-state or three-state check box glyph. |
| Sft_SetPictureRadioButton | Store a radio button glyph. |
| Sft_SetPictureUpDown | Store an up/down or sort-direction glyph. |
| Sft_SetPictureGDIPlusImage | Store a Gdiplus::Image* pointer. |
| Sft_SetPictureNETImage | Store an IUnknown* for a .NET image. |
| Sft_GetPictureSize | Return the picture's pixel width and height. |
| Sft_InitText | Zero a SFT_TEXT structure. |
| Constant family | Page | Purpose |
|---|---|---|
| SFT_PICTURE_* | Picture type constants | Selects which member of SFT_PICTURE.Picture is meaningful. |
| SFT_PICALIGN_* | Alignment constants | Horizontal and vertical alignment for pictures and text within a slot. |
| SFT_ORIENTATION_* | Orientation constants | Horizontal vs vertical text orientation. |
| SFT_PICFLAG_FREE | SFT_PICFLAG | Internal ownership marker on SFT_PICTURE.flag1. |
| SFT_IMAGEOVL_GHOSTED | SFT_IMAGEOVL | Style flag for the image-list overlay variant. |
| SFT_NOCOLOR | SFT_NOCOLOR | Sentinel COLORREF meaning "use the default". |
| SFT_TEXT_* | Text flags | Selection-outline / background flags on SFT_TEXT.flag2. |
| SFTPICTURE_VERSION | SFTPICTURE_VERSION | Header revision identifier. |
| Structure | Page | Purpose |
|---|---|---|
| SFT_PICTURE | SFT_PICTURE Structure | Image / picture / glyph descriptor. |
| SFT_TEXT | SFT_TEXT Structure | Text label descriptor (caption, font, color, alignment, GDI+ hints). |
Resources stored in a SFT_PICTURE - HBITMAP, HICON, HIMAGELIST, IPicture pointers, GDI+ Image objects, .NET IUnknown pointers, animation HWNDs - remain owned by the application. The helper functions never destroy handles or release COM references. Sft_ClearPicture only zeroes the structure. The application must keep its resources alive for as long as a SftXxx control might use them (typically until the control is destroyed) and is responsible for releasing them itself.
Not every DLL product supports every picture type. SftButton/DLL accepts SFT_PICTURE_GDIPLUS, SFT_PICTURE_BITMAP and SFT_PICTURE_ICON for its image slots; SftTree/DLL adds SFT_PICTURE_CB / RB / UPDOWN glyphs for its built-in cell renderers; SftTabs/DLL accepts a smaller subset for tab-label images; and so on. Each per-product help file lists the supported types for that product's image fields.
